Question: In the brute force approach to the 0/1 knapsack problem with 'n' items and a knapsack of capacity 'W', what is the time complexity?
In the brute force approach to the 0/1 knapsack problem with 'n' items and a knapsack of capacity 'W', what is the time complexity? a. None O b. O(n^2) O c. O(W^n) O d. 0(2^n) O e. O(nW)
Step by Step Solution
3.49 Rating (156 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provi... View full answer
Get step-by-step solutions from verified subject matter experts
