Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Find First and Last Position of Element in Sorted Array
Bookmark
Input
Target in middle
Target not found
Single occurrence
All same
Custom
nums
=
[5, 7, 7, 8, 8, 10]
,
target
=
8
0
5
1
7
2
7
3
8
4
8
5
10
algo
master
.
io
Step:
Start: Find first and last position of target 8 in the sorted array
0 / 18
Input
Target in middle
Target not found
Single occurrence
All same
Custom
nums
=
[5, 7, 7, 8, 8, 10]
,
target
=
8
0 / 18
0
5
1
7
2
7
3
8
4
8
5
10
algo
master
.
io
Step:
Start: Find first and last position of target 8 in the sorted array