How to understand the knapsack problem is NP-complete?

Viewed 53447

We know that the knapsack problem can be solved in O(nW) complexity by dynamic programming. But we say this is a NP-complete problem. I feel it is hard to understand here.

(n is the number of items. W is the maximum volume.)

7 Answers
Related