A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element and return its index. If the array contains multiple peaks, return the index…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.