Unbounded Knapsack
Items may repeat; the transition reads the same row instead of the previous one.
Decision · step 3 of 34Knapsack: Unbounded, the same items
Item 1 (weight 1, value 1) at capacity 1. Skip: 0 from above. Take: 1 + 0 from this row at capacity 0 = 1. Best: 1, take.
What you will see
The left-arrow stays in the current row; contrast with 0/1.
Cost
| Best | O(n * W) |
|---|---|
| Average | O(n * W) |
| Worst | O(n * W) |
| Space | O(W) |
How you work with it here
play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next.
Screen readers: Table cells announce their state and value; each step announces which cells were read and the value written.
Reduced motion: Dependency arrows appear statically and the cell value crossfades.