1 votes 1 votes Which of the following is a correct time complexity to solve the $0/1$ knapsack problem where $n$ and $w$ represents the number of items and capacity of knapsack respectively? $O(n)$ $O(w)$ $O(nw)$ $O(n+w)$ Algorithms nielit-sta-2020 algorithms dynamic-programming easy knapsack-problem time-complexity + – gatecse asked Dec 9, 2020 • retagged Jan 10 by Hira Thakur gatecse 669 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Time complexity of 0-1 Knapsack Problem using dynamic problem is $\mathcal{O(nw)}$ Option $C$ is correct. Hira Thakur answered Dec 11, 2020 Hira Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.