server/hamdis/legacy/hamming-distance-2.cpp
// Find Hamming distance between two sequences
// Takes input of a two locations for sequences to compare
Find Hamming distance between two sequences
Takes input of a two locations for sequences to compare
Find Hamming distance between two sequences Takes input of a two locations for sequences to compare
int hamming(string dna1, string dna2) {
	int len;
	len = dna1.length();
	int count = 0;
	for (int i=0; i<len; ++i) {
		if(dna1[i] != dna2[i])
			++count;
	}
	return count;
}
int hamming ( string dna1 , string dna2 ) { int len ; len = dna1 . length ( ) ; int count = 0 ; for ( int i = 0 ; i < len ; ++ i ) { if ( dna1 [ i ] != dna2 [ i ] ) ++ count ; } return count ; }
Find Hamming distance between two sequences
Takes input of a two locations for sequences to compare
Find Hamming distance between two sequences Takes input of a two locations for sequences to compare
// cout << "sequence length: " << len << endl;