Given two DNA strings *s* and *t* of equal length, find the number of corresponding symbols that differ in *s* and *t*. This is known as the Hamming distance.
Sample Input
GAGCCTACTAACGGGAT
CATCGTAATGACGGCCT
Sample Output
7
Constraints
Length of strings <= 1000
Iterate through both strings simultaneously and count the differences.
My Notes
Log in to save personal notes.
Console output will appear here when you click Run Code or Submit...