class Solution {
public:
int minArray(vector<int>& numbers) {
int n=numbers.size();
int i=0,j=n-1;
while(i<j){
int mid=(i+j)/2;
if(numbers[mid]>numbers[j]) i=mid+1;
else if(numbers[mid]<numbers[i]) j=mid;
else j--;
}
return numbers[i];
}
};