인덱스-1로 하면 안됨.
class Solution {
public:
int peakIndexInMountainArray(vector<int>& arr) {
int begin = 0;
int end = arr.size()-1;
while(begin < end){
int mid = (begin + end) / 2;
if(arr[mid]<arr[mid+1]){
begin = mid+1;
}else{
end = mid;
}
}
return begin;
}
};