Skip to content

Instantly share code, notes, and snippets.

@z0marlin
Created October 20, 2018 08:23
Show Gist options
  • Save z0marlin/e67bbbf2530752e47f364c6868dd2f0e to your computer and use it in GitHub Desktop.
Save z0marlin/e67bbbf2530752e47f364c6868dd2f0e to your computer and use it in GitHub Desktop.
WEC codebuddy week3 solution
class Solution:
def singleNumber(self, A):
res=0
count=0
for j in range(64):
count = 0
for i in A :
if 1<<j & i :
count+=1
if count%3 != 0 :
res=res|(1<<j)
return res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment