python
class Solution:
def findMin(self, nums: List[int]):
left, right = 0, len(nums)-1
while left < right:
mid = int(left + (right-left)/2)
if nums[mid] > nums[right]:
left = mid + 1
elif nums[mid] < nums[right]:
right = mid
elif nums[mid] == nums[right]:
right -= 1
return nums[left]