Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Two Sum II - Input Array Is Sorted
Bookmark
Brute Force
Binary Search
Two Pointers
Input
Example 1
Example 2
Example 3
Not found
Custom
numbers
=
[2, 7, 11, 15]
,
target
=
9
target = 9
0
1
2
3
2
7
11
15
target = 9
0
1
2
3
2
7
11
15
target = 9
0
1
2
3
2
7
11
15
i
j
target = 9
0
1
2
3
2
7
11
15
i
j
target = 9
0
1
2
3
2
7
11
15
i
j
target = 9
0
1
2
3
2
7
11
15
i
j
algo
master
.
io
Step:
Start: check every pair of numbers
0 / 4
Input
Example 1
Example 2
Example 3
Not found
Custom
numbers
=
[2, 7, 11, 15]
,
target
=
9
0 / 4
algo
master
.
io
Step:
Start: check every pair of numbers