Loading repovive.com/problems/classics/5
You have n items. Item i has weight wi and value vi. Each item can be used at most once.
Given a knapsack with capacity W, find the maximum total value you can carry.
max
3 50 10 60 20 100 30 120
For this input, the required output is 220.
220
4 10 5 10 4 40 6 30 3 50
For this input, the required output is 90.
90
5 20 5 30 10 50 15 100 3 20 8 60
For this input, the required output is 130.
130