🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: 0/1 Knapsack and Subset Sum: all 10 questions

Quiz: 0/1 Knapsack and Subset Sum · Question 6 of 10

Which problem is solved by looping the capacity from low to high?

Which problem is solved by looping the capacity from low to high?

  1. A.0/1 knapsack
  2. B.Equal partition
  3. C.Unbounded knapsack, where each item can be used any number of times
  4. D.Subset sum with each number used once
Answer & explanation

Correct answer: Unbounded knapsack, where each item can be used any number of times

Reusing the updated value is exactly what "unlimited copies" needs.

Can you get the rest right without peeking?

Take the timed Quiz: 0/1 Knapsack and Subset Sum quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →