In Some binary search, we can try to use two "mid" pointer. Sometimes, it will make life easier.

```
public int findPeakElement(int[] nums) {
//binary search O(logn) time
int l=0,h=nums.length-1;
while(l<h){
int m1 =(h-l)/2+l;
int m2 = m1+1;
if(nums[m1]>nums[m2]) h=m1;
else l=m2;
}
return l;
}
```