Answers for "hamming c++"

C++
0

hamming c++

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
}
Posted by: Guest on April-23-2021

Browse Popular Code Answers by Language