[DP] The 0-1 knapsack problem

Give a dynamic-programming solution to the 0-1 knapsack problem that runs in O(nW) time, where n is the number of items and W is the maximum weight of items that the thief can put in his knapsack.

[DP] The 0-1 knapsack problem[DP] The 0-1 knapsack problem

 

 

你可能感兴趣的:(dp)