Reading time: 20 minutes | Coding time: 10 minutes
n items, in which the
ith item has weight
wi and value
vi, find the maximum total value that can be put in a knapsack of capacity
W. You cannot break an item, either pick the complete item, or don't pick it.
This is a companion discussion topic for the original entry at http://iq.opengenus.org/0-1-knapsack-problem/