Challenge: Find the Peak Element

Find the peak element in an array, which is greater than both of its neighbors.

Peak element

A peak element in an array is an element that is greater than or equal to its neighbors. For elements at the end of an array, we only consider its single neighbor.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.