Login light

leetcode/136. 只出现一次的数字.md

利用异或

class Solution:
    def singleNumber(self, nums: List[int]) -> int:
        for index in range(1, len(nums)):
            nums[0] = nums[0] ^ nums[index]
        return nums[0]