LeetCode 154. Find Minimum in Rotated Sorted Array II
题目描述:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e.,
0 1 2 4 5 6 7
might become4 5 6 7 0 1 2
).Find the minimum element.
The array may contain duplicates.
与上一题类似, 但是有重复元素, 所以要用遍历的方法跳过这些元素.
1 | class Solution { |