Skip to content

Commit 60a7a37

Browse files
πŸ€– Auto-sync docs, metadata, and filepaths (#629)
Co-authored-by: glennj <[email protected]>
1 parent ba78629 commit 60a7a37

File tree

12 files changed

+78
-41
lines changed

12 files changed

+78
-41
lines changed

β€Žexercises/practice/binary-search-tree/.docs/instructions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,52 @@ All data in the left subtree is less than or equal to the current node's data, a
1919

2020
For example, if we had a node containing the data 4, and we added the data 2, our tree would look like this:
2121

22+
![A graph with root node 4 and a single child node 2.](https://assets.exercism.org/images/exercises/binary-search-tree/tree-4-2.svg)
23+
24+
```text
2225
4
2326
/
2427
2
28+
```
2529

2630
If we then added 6, it would look like this:
2731

32+
![A graph with root node 4 and two child nodes 2 and 6.](https://assets.exercism.org/images/exercises/binary-search-tree/tree-4-2-6.svg)
33+
34+
```text
2835
4
2936
/ \
3037
2 6
38+
```
3139

3240
If we then added 3, it would look like this
3341

42+
![A graph with root node 4, two child nodes 2 and 6, and a grandchild node 3.](https://assets.exercism.org/images/exercises/binary-search-tree/tree-4-2-6-3.svg)
43+
44+
```text
3445
4
3546
/ \
3647
2 6
3748
\
3849
3
50+
```
3951

4052
And if we then added 1, 5, and 7, it would look like this
4153

54+
![A graph with root node 4, two child nodes 2 and 6, and four grandchild nodes 1, 3, 5 and 7.](https://assets.exercism.org/images/exercises/binary-search-tree/tree-4-2-6-1-3-5-7.svg)
55+
56+
```text
4257
4
4358
/ \
4459
/ \
4560
2 6
4661
/ \ / \
4762
1 3 5 7
63+
```
64+
65+
## Credit
66+
67+
The images were created by [habere-et-dispertire][habere-et-dispertire] using [PGF/TikZ][pgf-tikz] by Till Tantau.
68+
69+
[habere-et-dispertire]: https://exercism.org/profiles/habere-et-dispertire
70+
[pgf-tikz]: https://en.wikipedia.org/wiki/PGF/TikZ

β€Žexercises/practice/bottle-song/.meta/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
],
1212
"example": [
1313
".meta/lib/example.dart"
14+
],
15+
"invalidator": [
16+
"pubspec.yaml"
1417
]
1518
},
1619
"blurb": "Produce the lyrics to the popular children's repetitive song: Ten Green Bottles.",

β€Žexercises/practice/flower-field/.meta/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
],
1717
"example": [
1818
".meta/lib/example.dart"
19+
],
20+
"invalidator": [
21+
"pubspec.yaml"
1922
]
2023
},
2124
"blurb": "Mark all the flowers in a garden."

β€Žexercises/practice/game-of-life/.meta/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
],
1212
"example": [
1313
".meta/lib/example.dart"
14+
],
15+
"invalidator": [
16+
"pubspec.yaml"
1417
]
1518
},
1619
"blurb": "Implement Conway's Game of Life.",

β€Žexercises/practice/house/.meta/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
],
1212
"example": [
1313
".meta/lib/example.dart"
14+
],
15+
"invalidator": [
16+
"pubspec.yaml"
1417
]
1518
},
1619
"blurb": "Output the nursery rhyme 'This is the House that Jack Built'.",

β€Žexercises/practice/luhn/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If the sum is evenly divisible by 10, the original number is valid.
4141

4242
### Invalid Canadian SIN
4343

44-
The number to be checked is `066 123 468`.
44+
The number to be checked is `066 123 478`.
4545

4646
We start at the end of the number and double every second digit, beginning with the second digit from the right and moving left.
4747

β€Žexercises/practice/meetup/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Your task is to find the exact date of a meetup, given a month, year, weekday and week.
44

5-
There are five week values to consider: `first`, `second`, `third`, `fourth`, `last`, `teenth`.
5+
There are six week values to consider: `first`, `second`, `third`, `fourth`, `last`, `teenth`.
66

77
For example, you might be asked to find the date for the meetup on the first Monday in January 2018 (January 1, 2018).
88

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,17 @@
11
# Instructions
22

3-
Translate RNA sequences into proteins.
3+
Your job is to translate RNA sequences into proteins.
44

5-
RNA can be broken into three-nucleotide sequences called codons, and then translated to a protein like so:
5+
RNA strands are made up of three-nucleotide sequences called **codons**.
6+
Each codon translates to an **amino acid**.
7+
When joined together, those amino acids make a protein.
68

7-
RNA: `"AUGUUUUCU"` => translates to
8-
9-
Codons: `"AUG", "UUU", "UCU"`
10-
=> which become a protein with the following sequence =>
11-
12-
Protein: `"Methionine", "Phenylalanine", "Serine"`
13-
14-
There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise.
15-
If it works for one codon, the program should work for all of them.
16-
However, feel free to expand the list in the test suite to include them all.
17-
18-
There are also three terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated.
19-
20-
All subsequent codons after are ignored, like this:
21-
22-
RNA: `"AUGUUUUCUUAAAUG"` =>
23-
24-
Codons: `"AUG", "UUU", "UCU", "UAA", "AUG"` =>
25-
26-
Protein: `"Methionine", "Phenylalanine", "Serine"`
27-
28-
Note the stop codon `"UAA"` terminates the translation and the final methionine is not translated into the protein sequence.
29-
30-
Below are the codons and resulting amino acids needed for the exercise.
9+
In the real world, there are 64 codons, which in turn correspond to 20 amino acids.
10+
However, for this exercise, you’ll only use a few of the possible 64.
11+
They are listed below:
3112

3213
| Codon | Amino Acid |
33-
| :----------------- | :------------ |
14+
| ------------------ | ------------- |
3415
| AUG | Methionine |
3516
| UUU, UUC | Phenylalanine |
3617
| UUA, UUG | Leucine |
@@ -40,6 +21,18 @@ Below are the codons and resulting amino acids needed for the exercise.
4021
| UGG | Tryptophan |
4122
| UAA, UAG, UGA | STOP |
4223

24+
For example, the RNA string β€œAUGUUUUCU” has three codons: β€œAUG”, β€œUUU” and β€œUCU”.
25+
These map to Methionine, Phenylalanine, and Serine.
26+
27+
## β€œSTOP” Codons
28+
29+
You’ll note from the table above that there are three **β€œSTOP” codons**.
30+
If you encounter any of these codons, ignore the rest of the sequence β€” the protein is complete.
31+
32+
For example, β€œAUGUUUUCUUAAAUG” contains a STOP codon (β€œUAA”).
33+
Once we reach that point, we stop processing.
34+
We therefore only consider the part before it (i.e. β€œAUGUUUUCU”), not any further codons after it (i.e. β€œAUG”).
35+
4336
Learn more about [protein translation on Wikipedia][protein-translation].
4437

4538
[protein-translation]: https://en.wikipedia.org/wiki/Translation_(biology)

β€Žexercises/practice/relative-distance/.docs/instructions.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Instructions
22

33
Your task is to determine the degree of separation between two individuals in a family tree.
4+
This is similar to the pop culture idea that every Hollywood actor is [within six degrees of Kevin Bacon][six-bacons].
45

56
- You will be given an input, with all parent names and their children.
67
- Each name is unique, a child _can_ have one or two parents.
@@ -13,22 +14,21 @@ Your task is to determine the degree of separation between two individuals in a
1314
Given the following family tree:
1415

1516
```text
16-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
17-
β”‚ Helena β”‚ β”‚ ErdΕ‘s β”‚ β”‚ Shusaku β”‚
18-
β””β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
19-
β”Œβ”€β”€β”€β”˜ └───────┐ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
20-
β–Ό β–Ό β–Ό
21-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
22-
β”‚ Isla β”‚ β”‚ Tariq β”‚ β”‚ Kevin β”‚
23-
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
24-
β–Ό β–Ό
25-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
17+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
18+
β”‚ Helena β”‚ β”‚ ErdΕ‘s β”œβ”€β”€β”€β”€β”€β”€ Shusaku β”‚
19+
β””β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
20+
β”Œβ”€β”€β”€β”˜ └───────┐ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
21+
β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
22+
β”‚ Isla β”œβ”€β”€β”€β”€β”€β”€ Tariq β”‚ β”‚ Kevin β”‚
23+
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
24+
β”‚ β”‚
25+
β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”
2626
β”‚ Uma β”‚ β”‚ Morphy β”‚
2727
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2828
```
2929

30-
The degree of separation between Tariq and Uma is 3 (Tariq β†’ Helena β†’ Isla β†’ Uma).
31-
There's no known relationship between Isla and [Kevin][six-bacons], as there is no connection in the given data.
30+
The degree of separation between Tariq and Uma is 2 (Tariq β†’ Isla β†’ Uma).
31+
There's no known relationship between Isla and Kevin, as there is no connection in the given data.
3232
The degree of separation between Uma and Isla is 1.
3333

3434
~~~~exercism/note

β€Žexercises/practice/relative-distance/.meta/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
],
1212
"example": [
1313
".meta/lib/example.dart"
14+
],
15+
"invalidator": [
16+
"pubspec.yaml"
1417
]
1518
},
1619
"blurb": "Given a family tree, calculate the degree of separation.",

0 commit comments

Comments
Β (0)