Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
3Sum
Bookmark
Brute Force
Hash Set
Two Pointers
Input
Example 1
Example 2
Example 3
No solution
Custom
nums
=
[-1, 0, 1, 2, -1, -4]
triples tried 0 · found 0
0
1
2
3
4
5
-1
0
1
2
-1
-4
triples tried 0 · found 0
0
1
2
3
4
5
-1
0
1
2
-1
-4
sum = 0 · found 1
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
triples tried 4 · found 1
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
sum = 0 · found 1
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
sum = -6 · found 2
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
sum = 0 · found 2
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
sum = 1 · found 2
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
triples tried 16 · found 2
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
sum = -4 · found 2
0
1
2
3
4
5
-1
0
1
2
-1
-4
i
j
k
triples tried 20 · found 2
0
1
2
3
4
5
-1
0
1
2
-1
-4
algo
master
.
io
Step:
Start: test every triple of indices
0 / 38
Input
Example 1
Example 2
Example 3
No solution
Custom
nums
=
[-1, 0, 1, 2, -1, -4]
0 / 38
algo
master
.
io
Step:
Start: test every triple of indices