Skip to content
TryAlgoViz
Algorithms
Articles
CS Fundamentals
Problems
Roadmap
Dashboard
Theme
0/1 Knapsack — TryAlgoViz
0/1 Knapsack
medium
Description
Hints
Discussion
Python
Reset
Run
Ctrl+Enter
Loading editor…
Test Case 1
Input
values=[60, 100, 120], weights=[10, 20, 30], W=50
weights
10
0
20
1
30
2
W
50
Expected Output
220