Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution(object):
- def singleNumber(self, nums):
- s = set()
- for num in nums:
- if num in s:
- s.remove(num)
- else:
- s.add(num)
- return s.pop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement