Hamming
We read DNA using the letters C,A,G and T. Two strands might look like this:
1 2 3 |
|
They have 7 differences, and therefore the Hamming Distance is 7.
The Hamming Distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :)
Task
Calculate the Hamming Distance between two DNA strands.
The Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
1 2 3 4 5 6 |
|
Last update: February 8, 2021