← Quiz: 0/1 Knapsack and Subset Sum: all 10 questions
Quiz: 0/1 Knapsack and Subset Sum · Question 7 of 10
How does equal partition reduce to subset sum?
How does equal partition reduce to subset sum?
- A.Check whether the largest number equals the smallest
- B.Sort the numbers and split them in the middle
- C.Check whether the total is a multiple of 3
- D.If the total is even, ask whether some subset sums to total / 2
Answer & explanation
Correct answer: If the total is even, ask whether some subset sums to total / 2
If one group sums to half the total, the remaining numbers form the other half.
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 →