540. Single Element in a Sorted Array

540. Single Element in a Sorted Array

class Solution:
    def singleNonDuplicate(self, nums: List[int]) -> int:
        l,r=0,len(nums)-1
        while l

二分

你可能感兴趣的:(leetcode)