I had a similiar AC solution,

```
public class Solution {
int solve(int[] nums, int l, int r){
int mid = l+(r-l)/2;
if(l > r) return -1;
if(mid == 0)
if(nums[mid] > nums[mid+1]) return mid;
else return solve(nums, mid+1, r);
else if(mid == nums.length-1)
if(nums[mid] > nums[mid-1]) return mid;
else return solve(nums, l, mid-1);
else if(nums[mid] > nums[mid-1] && nums[mid] > nums[mid+1]) return mid;
else return Math.max(solve(nums, l, mid-1), solve(nums, mid+1, r));
}
public int findPeakElement(int[] nums) {
int n = nums.length;
if(n == 1) return 0;
else return solve(nums, 0, nums.length-1);
}
```

}

and I also had the same question. Once I thought about it more though I realized this is not an O(logN) solution but it is in fact an O(N) solution. For each of the logN splits we make 2 recursive calls which gives us O(2^(logN)) = O(N). I had to think about it because I was wondering the same thing while thinking about this problem so do correct me if I am wrong anybody.