遇到有重复项,并且部分排序的情况,要r–
public int minArray(int[] numbers) {
int l = 0,r = numbers.length-1;
while(l<r){
int m = (r+l)>>1;
if(numbers[m]<numbers[r]) r =m;
else if (numbers[m]>numbers[r]) l = m+1;
else r--;
}
return numbers[l];
}