Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target. Each number in candidates may only be used once in the combination.
Asked at 14 companies
AdobeAmazonApple
Hints
1.Think about what data structure fits Combination Sum II
2.Consider the brute force complexity and how to optimize