Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Combination Sum II
Example 1
Multiple Dupes
Small
Custom
candidates
=
[1, 1, 2, 5, 6, 7, 10]
,
target
=
8
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
Step:
Start: Find combinations that sum to target (each candidate used at most once)
Variable
Value
pairs
-
target
8
result
-
candidates
Array(7) [1, 1, 2...]
Depth
Function Call
1
combinationSum2([1,1,2,5,6,7,10], 8)
0 / 310
Example 1
Multiple Dupes
Small
Custom
candidates
=
[1, 1, 2, 5, 6, 7, 10]
,
target
=
8
0 / 310
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
Step:
Start: Find combinations that sum to target (each candidate used at most once)
Visualization
Variables