0%
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| class Solution: def findMin(self, nums: List[int]) -> int: left = 0 right = len(nums)-1 def search_II(left,right): while left<right: mid = (left+right)>>1 if nums[mid]<nums[right]: right = mid else: left = mid+1 return left return nums[search_II(left,right)]
|