Given weights and values of N items, we need to put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Unlike 0/1 knapsack, you are allowed to break the item.
O(N log N)
O(N)