Skip to content

Instantly share code, notes, and snippets.

@jadechip
Created September 4, 2019 14:58
Show Gist options
  • Save jadechip/eb04674e96bbdc0365e5d4c4201f6baf to your computer and use it in GitHub Desktop.
Save jadechip/eb04674e96bbdc0365e5d4c4201f6baf to your computer and use it in GitHub Desktop.
Programming challenges: Odd Occurrences In Array
def solution(A):
result = 0
for num in A:
result ^= num
return result
@jadechip
Copy link
Author

jadechip commented Sep 4, 2019

Great resource for understanding the properties of the XOR bitwise operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment