Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 465 Bytes

instructions.md

File metadata and controls

16 lines (10 loc) · 465 Bytes

Instructions

Calculate the Hamming distance between two DNA strands.

We read DNA using the letters C, A, G and T. Two strands might look like this:

GAGCCTACTAACGGGAT
CATCGTAATGACGGCCT
^ ^ ^  ^ ^    ^^

They have 7 differences, and therefore the Hamming distance is 7.

Implementation notes

The Hamming distance is only defined for sequences of equal length, so an attempt to calculate it between sequences of different lengths should not work.