```
public class Solution {
public int findPeakElement(int[] nums) {
int lower = 0;
int upper = nums.length;
while (upper - lower > 1) {
int mid = lower + upper >> 1;
if (nums[mid] < nums[mid - 1])
upper = mid;
else
lower = mid;
}
return lower;
}
}
```