int hamming(int a, int b) { return __builtin_popcount(a^b); //hamming distance between string a and b }