Here is the interview question prompt, presented for reference.
A peak element
is an element that is strictly greater than its neighbors.
Consider that we are given a list of numbers, such as the following:
[1, 2, 3, 1]
Determine the peak element
of this list, and return its index. If the array contains multiple peaks, return the index to any of the peaks.
![image](https://storage.googleapis.com/algodailyrandomassets/curriculum/arrays/find-peak-element/problem.png)
nums.length
<= 1000nums[i]
<= 231 - 1nums[i] != nums[i + 1]
for all valid i
.You can see the full challenge with visuals at this link.
Challenges • Asked over 2 years ago by Jake from AlgoDaily
This is the main discussion thread generated for Find Peak Element (Main Thread).