DSAverse
Dynamic Programming
Loading Dynamic Programming...
DP Table Filling
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
subproblems
O(2^n)→O(n)
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Dynamic Programming
Loading Dynamic Programming...
DP Table Filling
Watch 2D DP decide — for each item at each capacity — whether to include or exclude it to maximize total value.
Click Play to begin
O(n × W)O(n × W)O(W)Question 1 of 3
What constraint makes this the '0/1' knapsack (not 'unbounded')?