Professional KnowledgeHardIBPS SO IT
0/1 knapsack with capacity W and n items by dynamic programming has complexity:
- A. O(n log W)
- B. O(2^n)
- C. O(n^2)
- 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.
Practise more IT Officer Professional Knowledge (IBPS SO) questionsIT Officer Professional Knowledge (IBPS SO): notes and key points
More IT Officer Professional Knowledge (IBPS SO) questions
- Edit distance between kitten and sitting is:
- Which problem is NP-complete?
- Regular expression (a+b)abb corresponds to a DFA over {a,b} with the minimum number of states equal to:
- Which of these is a context-free but not a regular language?
- Which of the following about C++ virtual functions is correct?
- In the V-model, unit testing corresponds to which development phase?