2018-11-26 leetcode Hamming Distance Hamming DistanceXOR Version - 36ms 12345678class Solution: def hammingDistance(self, x, y): """ :type x: int :type y: int :rtype: int """ return bin(x ^ y).count('1') test code 12In [100]: s = Solution(); t = s.hammingDistance(2, 67); print(t)2 汉明距离 leet code Newer Merge Two Binary Trees Older Longest Substring with At Least K Repeating Characters