Skip to content

Commit 72c16a8

Browse files
authored
hamming: Split into introduction and instructions (#2503)
1 parent eec1a6c commit 72c16a8

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

exercises/hamming/description.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

exercises/hamming/instructions.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Instructions
2+
3+
Calculate the Hamming distance between two DNA strands.
4+
5+
We read DNA using the letters C, A, G and T.
6+
Two strands might look like this:
7+
8+
GAGCCTACTAACGGGAT
9+
CATCGTAATGACGGCCT
10+
^ ^ ^ ^ ^ ^^
11+
12+
They have 7 differences, and therefore the Hamming distance is 7.
13+
14+
## Implementation notes
15+
16+
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.

exercises/hamming/introduction.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Introduction
2+
3+
Your body is made up of cells that contain DNA.
4+
Those cells regularly wear out and need replacing, which they achieve by dividing into daughter cells.
5+
In fact, the average human body experiences about 10 quadrillion cell divisions in a lifetime!
6+
7+
When cells divide, their DNA replicates too.
8+
Sometimes during this process mistakes happen and single pieces of DNA get encoded with the incorrect information.
9+
If we compare two strands of DNA and count the differences between them, we can see how many mistakes occurred.
10+
This is known as the "Hamming distance".
11+
12+
The Hamming distance is useful in many areas of science, not just biology, so it's a nice phrase to be familiar with :)

0 commit comments

Comments
 (0)