Professional KnowledgeHardIBPS SO IT

0/1 knapsack with capacity W and n items by dynamic programming has complexity:

  1. A. O(n log W)
  2. B. O(2^n)
  3. C. O(n^2)
  4. D. O(nW), pseudo-polynomial

Correct answer: D. O(nW), pseudo-polynomial

Table of n by W cells; polynomial in the numeric value of W.

More IT Officer Professional Knowledge (IBPS SO) questions

Exams that ask this topic