Skip to content

Instantly share code, notes, and snippets.

@VojtaStavik
Created April 5, 2017 19:14
Show Gist options
  • Save VojtaStavik/002a7a80c8374204e6f283da72367f7d to your computer and use it in GitHub Desktop.
Save VojtaStavik/002a7a80c8374204e6f283da72367f7d to your computer and use it in GitHub Desktop.
func calculateHammingDistance(x: Int, y: Int) -> Int {
// Step 1: Find different bits
let differentBits = x ^ y
// Step 2: Count them
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment