Combination Sum

Given an array of distinct positive integers candidates and a positive integer target, return all unique combinations of candidates whose values sum to target.

Each candidate may be chosen ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: