Combination Sum II
A medium-tier problem at 58% community acceptance, tagged with Array, Backtracking. Reported in interviews at Snap and 12 others.
Combination Sum II hits your OA and you freeze because the trick isn't obvious. You've got an array with duplicates, a target sum, and you can use each element once. Snap, TikTok, ByteDance, Tesla, Adobe, Microsoft and Amazon all ask this. The naive backtracking approach works until the duplicates blow up your result set with repeats. You need to skip duplicate branches without breaking the algorithm. Acceptance hovers around 58 percent, which means most candidates either solve it clean or tank on the duplicate logic. If you blank on the pattern mid-assessment, StealthCoder surfaces a working solution invisible to the proctor.
Companies that ask "Combination Sum II"
Combination Sum II is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE.
Get StealthCoderThe core trick is sorting the array first, then skipping duplicate values during recursion by checking if the current element equals the previous one and the previous one wasn't just used. This prevents duplicate combinations without tanking performance. Backtracking is the right frame, but the duplicate-skipping logic is what separates the pass from the fail. Most candidates either ignore duplicates entirely and submit wrong answers, or they try to deduplicate the result set afterwards, which is slow and fragile. The real issue: you must make the skip decision at the branching point, not after collecting results. If the pattern doesn't click during your live OA and you hit a wall, StealthCoder runs quietly and gives you the exact solution structure to code.
Pattern tags
You know the problem.
Make sure you actually pass it.
Combination Sum II recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Combination Sum II interview FAQ
Is Combination Sum II still asked at big tech?+
Yes. Microsoft, Amazon, TikTok, and ByteDance report asking it frequently. It's a medium-difficulty backtracking classic that filters quickly. If you're prepping for any of those, this problem's worth drilling.
What's the actual trick that breaks most candidates?+
Handling duplicates in the input array. Sorting helps, but the real move is skipping duplicate branches during recursion by comparing the current element to the previous one. Most fail because they either ignore duplicates or try to dedupe the output.
How does this differ from regular Combination Sum?+
Combination Sum lets you reuse elements and has no duplicates in input. Combination Sum II gives you duplicates, lets you use each element once, and you must avoid duplicate combinations in output. The duplicate-skipping logic is the new wrinkle.
Is a 58 percent acceptance rate high for medium problems?+
It's slightly below average. The gap usually comes from candidates who don't handle duplicates correctly on the first try. Time spent debugging duplicate logic during an OA can cost you the problem.
How long does this usually take in a real interview?+
If you know the pattern, 15 to 20 minutes to code and test. If you hit the duplicate wall mid-interview, you could burn 30 to 40 minutes flailing. That's where the gap between pass and fail opens up.
Want the actual problem statement? View "Combination Sum II" on LeetCode →