Given an array of integers, find a peak element. A peak element is an element that is strictly greater than its neighbors. For boundary elements, consider the neighbor outside the array as negative…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.