Skip to content

Instantly share code, notes, and snippets.

@munguial
Last active April 1, 2020 07:48
Show Gist options
  • Save munguial/0c45ae9a306bb0dc2f8876485255c031 to your computer and use it in GitHub Desktop.
Save munguial/0c45ae9a306bb0dc2f8876485255c031 to your computer and use it in GitHub Desktop.
Day 1 - Single number
# https://leetcode.com/explore/challenge/card/30-day-leetcoding-challenge/528/week-1/3283/
class Solution:
def singleNumber(self, nums: List[int]) -> int:
result = 0
for number in nums:
result ^= number
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment