Skip to content

guess the next step: 0/1 knapsack

Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.

Step 7 of 17

012345ABC00000000005050000
Item B weighs 2, more than the room of 1, so it cannot go in. Keep 0 from the cell above.

Question 7 of 15

What happens next?

Your guess