Challenge: Find the Peak Element
In this lesson, we will find the peak element in a given list, which is element that is greater than both of its neighbors.
We'll cover the following
Peak element
A peak element in a list is the element that is greater than or equal to its neighbors. For elements at the end of a list, we only consider its single neighbor.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.