Created
January 22, 2019 03:42
-
-
Save schaitanya/bf9a08af6359ead056929c968b8afe16 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
func singleNumber(nums []int) int { | |
i := 0 | |
for _, v := range nums { | |
i ^= v | |
} | |
return i | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment