Interview Coder drill
Interview Coder drill
Interview Coder drill
20:00
Given candidate numbers and a target, print every unique combination that sums to target. Sort each combination ascending, then join combinations with |.
Example 1
Input: candidates = [2,3,6,7], target = 7
Output: 2 2 3|7
2 + 2 + 3 and 7 both reach the target.
Constraints
Capture your plan, then rate how clearly you recalled it before submitting.