https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/
使用二分,左右指针,再mid
和他们比。
https://www.acwing.com/solution/content/727/
class Solution { public int minArray(int[] numbers) { int n = numbers.length - 1; if(n < 0) return -1; while(n > 0 && numbers[n] == numbers[0]) n--; if(numbers[0] < numbers[n]) return numbers[0]; int l = 0, r = n; while(l < r){ int mid = l + r >> 1; if(numbers[mid] < numbers[0]) r = mid; else l = mid + 1; } return numbers[r]; } }