📜  hamming c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:47.280000             🧑  作者: Mango

代码示例1
int hamming(string a, string b) {
    int d = 0;
    for (int i = 0; i < k; i++) {
        if (a[i] != b[i]) d++;
    }
    return d;//hamming distance between 2 strings a and b
}