LeetCode
Peak Index in a Mountain Array
Click
here
for an explanation.