Bird
Raised Fist0

Given the final output of the Combination Sum II function for candidates = [1,1,2,5,6,7,10] and target = 8 is [[1,1,6],[1,2,5],[1,7],[2,6]], which candidate was NOT used in any combination?

hard🔄 Reverse Engineer Q9 of Q15
Subsets & Combinations - Combination Sum II (No Reuse, Duplicates)
Given the final output of the Combination Sum II function for candidates = [1,1,2,5,6,7,10] and target = 8 is [[1,1,6],[1,2,5],[1,7],[2,6]], which candidate was NOT used in any combination?
A10
B6
C7
D1
Step-by-Step Solution
Solution:
  1. Step 1: Review output combinations

    All combinations sum to 8 and include 1,2,5,6,7 but none include 10.
  2. Step 2: Confirm candidate usage

    Candidate 10 is never used because it exceeds or cannot fit into target 8 with others.
  3. Final Answer:

    Option A -> Option A
  4. Quick Check:

    10 is excluded from all valid combinations [OK]
Quick Trick: Check output combos to find unused candidates [OK]
Common Mistakes:
MISTAKES
  • Assuming all candidates appear in output
  • Ignoring candidates too large for target
Trap Explanation:
PITFALL
  • Candidates often assume all input numbers appear in output combinations.
Interviewer Note:
CONTEXT
  • Tests ability to reason backward from output to input usage.
Master "Combination Sum II (No Reuse, Duplicates)" in Subsets & Combinations

3 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Subsets & Combinations Quizzes