Last active
March 23, 2017 21:11
-
-
Save divmgl/ee58ee28471a867c4f064c06559cdd53 to your computer and use it in GitHub Desktop.
Codility.com OddOccurrencesInArray 100%/100%
This file contains hidden or 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 solution(A): | |
table = dict() | |
for num in A: | |
if not table.get(num): | |
table[num] = 1 | |
else: | |
table.pop(num) | |
return table.keys()[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment