// 1. 二段性-> 极值点必定存在且单调
class Solution {
public int findPeakElement(int[] nums) {
int l = 0 , r = nums.length-1;
while (l < r){
int mid = (l + r) >> 1;
if (nums[mid] > nums[mid +1 ]) r = mid;
else l = mid + 1 ;
}
return l;
}
}