Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
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
1
2
3
4
5
5
7
7
8
8
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
1
2
3
4
5
5
7
7
8
8
10
algo
master
.
io
Step:
Start: Find first and last position of target 8 in the sorted array