class Solution: def singleNumber(self, nums: List[int]) -> int: result = 0 for num in nums: result ^= num return result
Last updated 2 years ago