LeetCodeDiary

A Diary for solving LeetCode problems

View on GitHub
class Solution:
    def findMin(self, nums: List[int]) -> int:
        low, high = 0, len(nums) - 1
        while low < high:
            pivot = low + (high - low) // 2
            if nums[pivot] < nums[high]:
                high = pivot 
            elif nums[pivot] > nums[high]:
                low = pivot + 1
            else:
                high -= 1
        return nums[low]

数组 困难 每日一题

https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-ii/