This is follow up to Find Minimum in Rotated Sorted Array. Suppose a sorted array is rotated at some pivot unknown to you beforehand, and duplicates are allowed. Find the minimum element.
Input Return [1, 1, 3, 4] 1 [2, 3, 0, 2] 0
The following uses the same approach as the previous problem. The only difference is that, when
num[right], we can drop one of them. The worse case time complexity is O(n).