Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Find Peak Element
Bookmark
Linear Scan
Binary Search
Input
Example 1
Example 2
Ascending
Descending
Single element
Custom
nums
=
[1, 2, 3, 1]
0
1
2
3
1
2
3
1
0
1
2
3
1
2
3
1
0
1
2
3
1
2
3
1
i
0
1
2
3
1
2
3
1
i
0
1
2
3
1
2
3
1
i
0
1
2
3
1
2
3
1
peak
algo
master
.
io
Step:
Start: find a peak element in the array
0 / 4
Input
Example 1
Example 2
Ascending
Descending
Single element
Custom
nums
=
[1, 2, 3, 1]
0 / 4
algo
master
.
io
Step:
Start: find a peak element in the array