Leetcode 162: Find Peak Element
The original question can be found here. It’s asking us to find an element that is grater than both left and right neighbors. Since it’s asking for a O(logn) solution, let’s directly jump to the binary search solution. There’re 4…