Skip to content

Latest commit

 

History

History
19 lines (18 loc) · 404 Bytes

153.md

File metadata and controls

19 lines (18 loc) · 404 Bytes

Solution

class Solution(object):
    def findMin(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        l, r = 0, len(nums) - 1
        while l < r:
            mid = l + ((r - l) >> 1)
            if nums[mid] > nums[r]:
                l = mid + 1
            else:
                r = mid
        
        return nums[l]