Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).
Find the minimum element.
You may assume no duplicate exists in the array.
显然O(n)算法不是面试者想要的, 既然有序肃然rotated了, 但是还是有规律可循, binary search is well。
如果start < end 说明在一个有序队列里, 直接return start;检查mid 和start 的值, 如果start < mid, 说明 最小值在mid后面, 否则说明正在前面, 最后返回start