Question DSA-DP-0019
HardWhen you iterate capacity downwards in a 1D 0/1 knapsack array, what does that ensure?
- A.
The array is sorted
- B.
The answer is computed faster
- 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
When you iterate capacity downwards in a 1D 0/1 knapsack array, what does that ensure?
The array is sorted
The answer is computed faster
Sign up free to see the answer and a step-by-step explanation.
Each item is used at most once
Each item can be used many times