[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.

 

 

posted @ 2014-06-10 12:17  门对夕阳  阅读(358)  评论(0编辑  收藏  举报