Forked from farsialgorithm/find-single-number-bitxor.py
Created
January 30, 2020 19:19
-
-
Save itsmenick212/31b5495b25075dc627e29ec6a964dc73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def singleNumber(nums): | |
v = 0 | |
for i in nums: | |
v ^= i | |
return v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment