LeetCode p154 Find Minimum in Rotated Sorted Array II 题解
1.题目:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
Find the minimum element.
The array may contain duplicates.
题意:
折断旋转的有序数组,找到最小数。
2.解题思路:
二分查找
3.代码
1 |
|