Skip to content

Instantly share code, notes, and snippets.

@els-pnw
Created March 13, 2017 14:38
Show Gist options
  • Save els-pnw/936faed3ace06c1575e46e131dc4e74c to your computer and use it in GitHub Desktop.
Save els-pnw/936faed3ace06c1575e46e131dc4e74c to your computer and use it in GitHub Desktop.
def find_outlier(integers):
parities = []
for i in integers:
parities.append(i & 1)
return integers[parities.index((parities[0] in parities[1:3]) ^ parities[0])]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment