461 Hamming Distance Description link Solution See Code Code O(n) class Solution: def hammingDistance(self, x: int, y: int) -> int: return bin(x^y).count('1')