Skip to content

Instantly share code, notes, and snippets.

@iafsilva
Last active May 4, 2023 15:11
Show Gist options
  • Save iafsilva/2c7254230d070247a9cc413754481893 to your computer and use it in GitHub Desktop.
Save iafsilva/2c7254230d070247a9cc413754481893 to your computer and use it in GitHub Desktop.
OddOccurrencesInArray-UltimateSolution
fun solution(A: IntArray): Int {
var unpairedElement = 0
for (element in A) unpairedElement = unpairedElement xor element
return unpairedElement
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment