Skip to content

Commit e285674

Browse files
authored
Sync docs and metadata (#1024)
1 parent a2e7771 commit e285674

File tree

50 files changed

+439
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+439
-204
lines changed

exercises/practice/acronym/.docs/instructions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Punctuation is handled as follows: hyphens are word separators (like whitespace)
1010

1111
For example:
1212

13-
|Input|Output|
14-
|-|-|
15-
|As Soon As Possible|ASAP|
16-
|Liquid-crystal display|LCD|
17-
|Thank George It's Friday!|TGIF|
13+
| Input | Output |
14+
| ------------------------- | ------ |
15+
| As Soon As Possible | ASAP |
16+
| Liquid-crystal display | LCD |
17+
| Thank George It's Friday! | TGIF |

exercises/practice/allergies/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Now, given just that score of 34, your program should be able to say:
2222
- Whether Tom is allergic to any one of those allergens listed above.
2323
- All the allergens Tom is allergic to.
2424

25-
Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.).
25+
Note: a given score may include allergens **not** listed above (i.e. allergens that score 256, 512, 1024, etc.).
2626
Your program should ignore those components of the score.
2727
For example, if the allergy score is 257, your program should only report the eggs (1) allergy.

exercises/practice/armstrong-numbers/.docs/instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ An [Armstrong number][armstrong-number] is a number that is the sum of its own d
55
For example:
66

77
- 9 is an Armstrong number, because `9 = 9^1 = 9`
8-
- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 1`
8+
- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1`
99
- 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
10-
- 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
10+
- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
1111

1212
Write some code to determine whether a number is an Armstrong number.
1313

exercises/practice/atbash-cipher/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Instructions
22

3-
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
3+
Create an implementation of the Atbash cipher, an ancient encryption system created in the Middle East.
44

55
The Atbash cipher is a simple substitution cipher that relies on transposing all the letters in the alphabet such that the resulting alphabet is backwards.
66
The first letter is replaced with the last letter, the second with the second-last, and so on.

exercises/practice/atbash-cipher/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
".meta/example.h"
2626
]
2727
},
28-
"blurb": "Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.",
28+
"blurb": "Create an implementation of the Atbash cipher, an ancient encryption system created in the Middle East.",
2929
"source": "Wikipedia",
3030
"source_url": "https://en.wikipedia.org/wiki/Atbash"
3131
}

exercises/practice/binary-search-tree/.meta/config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@
2424
]
2525
},
2626
"blurb": "Insert and search for numbers in a binary tree.",
27-
"source": "Josh Cheek",
28-
"source_url": "https://twitter.com/josh_cheek"
27+
"source": "Josh Cheek"
2928
}

exercises/practice/binary-search/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Binary search only works when a list has been sorted.
1111

1212
The algorithm looks like this:
1313

14-
- Find the middle element of a *sorted* list and compare it with the item we're looking for.
14+
- Find the middle element of a _sorted_ list and compare it with the item we're looking for.
1515
- If the middle element is our item, then we're done!
1616
- If the middle element is greater than our item, we can eliminate that element and all the elements **after** it.
1717
- If the middle element is less than our item, we can eliminate that element and all the elements **before** it.

exercises/practice/binary/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A number 23 in base 10 notation can be understood as a linear combination of pow
2020
- The rightmost digit gets multiplied by 10^0 = 1
2121
- The next number gets multiplied by 10^1 = 10
2222
- ...
23-
- The *n*th number gets multiplied by 10^*(n-1)*.
23+
- The nth number gets multiplied by 10^_(n-1)_.
2424
- All these values are summed.
2525

2626
So: `23 => 2*10^1 + 3*10^0 => 2*10 + 3*1 = 23 base 10`

exercises/practice/circular-buffer/.docs/instructions.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,55 @@ A circular buffer, cyclic buffer or ring buffer is a data structure that uses a
44

55
A circular buffer first starts empty and of some predefined length.
66
For example, this is a 7-element buffer:
7-
<!-- prettier-ignore -->
8-
[ ][ ][ ][ ][ ][ ][ ]
7+
8+
```text
9+
[ ][ ][ ][ ][ ][ ][ ]
10+
```
911

1012
Assume that a 1 is written into the middle of the buffer (exact starting location does not matter in a circular buffer):
11-
<!-- prettier-ignore -->
12-
[ ][ ][ ][1][ ][ ][ ]
13+
14+
```text
15+
[ ][ ][ ][1][ ][ ][ ]
16+
```
1317

1418
Then assume that two more elements are added — 2 & 3 — which get appended after the 1:
15-
<!-- prettier-ignore -->
16-
[ ][ ][ ][1][2][3][ ]
19+
20+
```text
21+
[ ][ ][ ][1][2][3][ ]
22+
```
1723

1824
If two elements are then removed from the buffer, the oldest values inside the buffer are removed.
1925
The two elements removed, in this case, are 1 & 2, leaving the buffer with just a 3:
20-
<!-- prettier-ignore -->
21-
[ ][ ][ ][ ][ ][3][ ]
26+
27+
```text
28+
[ ][ ][ ][ ][ ][3][ ]
29+
```
2230

2331
If the buffer has 7 elements then it is completely full:
24-
<!-- prettier-ignore -->
25-
[5][6][7][8][9][3][4]
32+
33+
```text
34+
[5][6][7][8][9][3][4]
35+
```
2636

2737
When the buffer is full an error will be raised, alerting the client that further writes are blocked until a slot becomes free.
2838

2939
When the buffer is full, the client can opt to overwrite the oldest data with a forced write.
3040
In this case, two more elements — A & B — are added and they overwrite the 3 & 4:
31-
<!-- prettier-ignore -->
32-
[5][6][7][8][9][A][B]
41+
42+
```text
43+
[5][6][7][8][9][A][B]
44+
```
3345

3446
3 & 4 have been replaced by A & B making 5 now the oldest data in the buffer.
3547
Finally, if two elements are removed then what would be returned is 5 & 6 yielding the buffer:
36-
<!-- prettier-ignore -->
37-
[ ][ ][7][8][9][A][B]
48+
49+
```text
50+
[ ][ ][7][8][9][A][B]
51+
```
3852

3953
Because there is space available, if the client again uses overwrite to store C & D then the space where 5 & 6 were stored previously will be used not the location of 7 & 8.
4054
7 is still the oldest element and the buffer is once again full.
41-
<!-- prettier-ignore -->
42-
[C][D][7][8][9][A][B]
55+
56+
```text
57+
[C][D][7][8][9][A][B]
58+
```

exercises/practice/clock/.meta/config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@
2525
]
2626
},
2727
"blurb": "Implement a clock that handles times without dates.",
28-
"source": "Pairing session with Erin Drummond",
29-
"source_url": "https://twitter.com/ebdrummond"
28+
"source": "Pairing session with Erin Drummond"
3029
}

0 commit comments

Comments
 (0)