Compute the Hamming Distance Between Two Strings solved by 2664

Sept. 6, 2015, 4:51 a.m. by Rosalind Team

We say that position i in k-mers p1pk and q1qk is a mismatch if piqi. For example, CGAAT and CGGAC have two mismatches. The number of mismatches between strings p and q is called the Hamming distance between these strings and is denoted HammingDistance(p, q).

Hamming Distance Problem

Compute the Hamming distance between two DNA strings.

Given: Two DNA strings.

Return: An integer value representing the Hamming distance.

Sample Dataset

GGGCCGTTGGT
GGACCGTTGAC

Sample Output

3

Extra Datasets

Please login to solve this problem.