Combination Sum
Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target.
Combination Sum

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target.

Example 1:
Input: {"candidates":[2,3,6,7],"target":7}
Output: [[2,2,3],[7]]
Input
arr ={"candidates":[2,3,6,7],"target":7}

Check sum: 0 vs target 7

Candidates

2

3

6

7

Current Combination

Empty

Sum: 0
Found Solutions
Variables
VariableValue
i0
total0
cur[]
DepthFunction Call
1dfsi=0, cur=[], total=0
0/136