Write a function that calculates the Hamming distance. — def hamming_distance(x, y): difference = x ^ y count = 0 while difference != 0: count += 1 difference &= difference - 1 return count
G
1.2K
Google Interview
This flashcard deck made by jwasham contains knowledge about google interview. For more details, please follow https://github.com/jwasham/google-interview-university