Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Combination Sum
Example 1
Multiple Solutions
No Solution
Reuse Elements
Many Candidates
Custom
candidates
=
[2, 3, 6, 7]
,
target
=
7
2
3
6
7
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
Step:
Start: Find combinations that sum to target
Variable
Value
candidates
[2,3,6,7]
target
7
result
-
Depth
Function Call
1
combinationSum([2,3,6,7], 7)
0 / 113
Example 1
Multiple Solutions
No Solution
Reuse Elements
Many Candidates
Custom
candidates
=
[2, 3, 6, 7]
,
target
=
7
0 / 113
2
3
6
7
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
Step:
Start: Find combinations that sum to target
Visualization
Variables