Skip to content

Commit dc28ef2

Browse files
authored
[Problem Spec Sync] Practice Exercise Instruction Sync (#3507)
* Synced exercise insructions with problem specifications. * Delete exercises/practice/raindrops/.articles/Progression Revised.md --> File added by mistake. Still needs additions and revisions before committing.
1 parent adc4659 commit dc28ef2

File tree

32 files changed

+140
-121
lines changed

32 files changed

+140
-121
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/affine-cipher/.docs/instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The affine cipher is a type of monoalphabetic substitution cipher.
66
Each character is mapped to its numeric equivalent, encrypted with a mathematical function and then converted to the letter relating to its new numeric value.
77
Although all monoalphabetic ciphers are weak, the affine cipher is much stronger than the atbash cipher, because it has many more keys.
88

9-
[//]: # ( monoalphabetic as spelled by Merriam-Webster, compare to polyalphabetic )
9+
[//]: # " monoalphabetic as spelled by Merriam-Webster, compare to polyalphabetic "
1010

1111
## Encryption
1212

@@ -23,7 +23,7 @@ Where:
2323
For the Roman alphabet `m` is `26`.
2424
- `a` and `b` are integers which make the encryption key
2525

26-
Values `a` and `m` must be *coprime* (or, *relatively prime*) for automatic decryption to succeed, i.e., they have number `1` as their only common factor (more information can be found in the [Wikipedia article about coprime integers][coprime-integers]).
26+
Values `a` and `m` must be _coprime_ (or, _relatively prime_) for automatic decryption to succeed, i.e., they have number `1` as their only common factor (more information can be found in the [Wikipedia article about coprime integers][coprime-integers]).
2727
In case `a` is not coprime to `m`, your program should indicate that this is an error.
2828
Otherwise it should encrypt or decrypt with the provided key.
2929

exercises/practice/all-your-base/.docs/instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ Given a number in base **a**, represented as a sequence of digits, convert it to
1414

1515
In positional notation, a number in base **b** can be understood as a linear combination of powers of **b**.
1616

17-
The number 42, *in base 10*, means:
17+
The number 42, _in base 10_, means:
1818

1919
`(4 * 10^1) + (2 * 10^0)`
2020

21-
The number 101010, *in base 2*, means:
21+
The number 101010, _in base 2_, means:
2222

2323
`(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0)`
2424

25-
The number 1120, *in base 3*, means:
25+
The number 1120, _in base 3_, means:
2626

2727
`(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)`
2828

2929
I think you got the idea!
3030

31-
*Yes. Those three numbers above are exactly the same. Congratulations!*
31+
_Yes. Those three numbers above are exactly the same. Congratulations!_
3232

3333
[positional-notation]: https://en.wikipedia.org/wiki/Positional_notation

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/binary-search/.docs/instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ Your task is to implement a binary search algorithm.
55
A binary search algorithm finds an item in a list by repeatedly splitting it in half, only keeping the half which contains the item we're looking for.
66
It allows us to quickly narrow down the possible locations of our item until we find it, or until we've eliminated all possible locations.
77

8-
~~~~exercism/caution
8+
```exercism/caution
99
Binary search only works when a list has been sorted.
10-
~~~~
10+
```
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/book-store/.docs/instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ This would give a total of:
3636

3737
Resulting in:
3838

39-
- 5 × (100% - 25%) * $8 = 5 × $6.00 = $30.00, plus
40-
- 3 × (100% - 10%) * $8 = 3 × $7.20 = $21.60
39+
- 5 × (100% - 25%) × $8 = 5 × $6.00 = $30.00, plus
40+
- 3 × (100% - 10%) × $8 = 3 × $7.20 = $21.60
4141

4242
Which equals $51.60.
4343

@@ -53,8 +53,8 @@ This would give a total of:
5353

5454
Resulting in:
5555

56-
- 4 × (100% - 20%) * $8 = 4 × $6.40 = $25.60, plus
57-
- 4 × (100% - 20%) * $8 = 4 × $6.40 = $25.60
56+
- 4 × (100% - 20%) × $8 = 4 × $6.40 = $25.60, plus
57+
- 4 × (100% - 20%) × $8 = 4 × $6.40 = $25.60
5858

5959
Which equals $51.20.
6060

exercises/practice/bowling/.docs/instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ There are three cases for the tabulation of a frame.
2323

2424
Here is a three frame example:
2525

26-
| Frame 1 | Frame 2 | Frame 3 |
27-
| :-------------: |:-------------:| :---------------------:|
28-
| X (strike) | 5/ (spare) | 9 0 (open frame) |
26+
| Frame 1 | Frame 2 | Frame 3 |
27+
| :--------: | :--------: | :--------------: |
28+
| X (strike) | 5/ (spare) | 9 0 (open frame) |
2929

3030
Frame 1 is (10 + 5 + 5) = 20
3131

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/dot-dsl/.docs/instructions.md

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

33
A [Domain Specific Language (DSL)][dsl] is a small language optimized for a specific domain.
4-
Since a DSL is targeted, it can greatly impact productivity/understanding by allowing the writer to declare *what* they want rather than *how*.
4+
Since a DSL is targeted, it can greatly impact productivity/understanding by allowing the writer to declare _what_ they want rather than _how_.
55

66
One problem area where they are applied are complex customizations/configurations.
77

0 commit comments

Comments
 (0)