import java.util.*;
public class Solution {
public int findPeakElement (int[] nums) {
// write code here
int left=0;
int right=nums.length-1;
while(leftnums[mid+1]){
right=mid;
}else{
left=mid+1;
}
}
return left;
}
}



