剑指offer中大体思路
while (a[left] >=a[right])
{
if (left + 1 == right)
return a[right];
int mid = left + (right - left) / 2;
if (arr[left] == arr[mid] ==arr[right])
{
int ans = arr[left];
for (int i = left + 1; i<= right; ++i)
ans = min(ans,arr[i]);
}
if (arr[mid] >= arr[left])
left = mid;
else if (arr[mid] <= arr[right])
right = mid;
}