Question DSA-DP-0013
MediumWhat is the time complexity of the standard 0/1 knapsack DP with n items and capacity W?
- A.
O(n × W)
- B.
O(n log n)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Dynamic Programming question
What is the time complexity of the standard 0/1 knapsack DP with n items and capacity W?
O(n × W)
O(n log n)
Sign up free to see the answer and a step-by-step explanation.
O(W)
O(2ⁿ)