Skip to content

Commit

Permalink
runs configlet sync -u
Browse files Browse the repository at this point in the history
  • Loading branch information
CJSmith-0141 committed Feb 8, 2022
1 parent 79484bc commit 2711980
Show file tree
Hide file tree
Showing 70 changed files with 379 additions and 159 deletions.
5 changes: 5 additions & 0 deletions exercises/practice/accumulate/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ description = "accumulate reversed strings"

[bee8e9b6-b16f-4cd2-be3b-ccf7457e50bb]
description = "accumulate recursively"
include = false

[0b357334-4cad-49e1-a741-425202edfc7c]
description = "accumulate recursively"
reimplements = "bee8e9b6-b16f-4cd2-be3b-ccf7457e50bb"
2 changes: 1 addition & 1 deletion exercises/practice/acronym/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Convert a long phrase to its acronym",
"blurb": "Convert a long phrase to its acronym.",
"authors": [
"ricemery"
],
Expand Down
6 changes: 3 additions & 3 deletions exercises/practice/all-your-base/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ combination of powers of **b**.

The number 42, *in base 10*, means:

(4 * 10^1) + (2 * 10^0)
(4 \* 10^1) + (2 \* 10^0)

The number 101010, *in base 2*, means:

(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0)
(1 \* 2^5) + (0 \* 2^4) + (1 \* 2^3) + (0 \* 2^2) + (1 \* 2^1) + (0 \* 2^0)

The number 1120, *in base 3*, means:

(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)
(1 \* 3^3) + (1 \* 3^2) + (2 \* 3^1) + (0 \* 3^0)

I think you got the idea!

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/allergies/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ So if Tom is allergic to peanuts and chocolate, he gets a score of 34.

Now, given just that score of 34, your program should be able to say:

- Whether Tom is allergic to any one of those allergens listed above.
- All the allergens Tom is allergic to.
* Whether Tom is allergic to any one of those allergens listed above.
* All the allergens Tom is allergic to.

Note: a given score may include allergens **not** listed above (i.e.
allergens that score 256, 512, 1024, etc.). Your program should
Expand Down
15 changes: 10 additions & 5 deletions exercises/practice/anagram/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Instructions

An anagram is a rearrangement of letters to form a new word.
Given a word and a list of candidates, select the sublist of anagrams of the given word.
An anagram is a rearrangement of letters to form a new word: for example `"owns"` is an anagram of `"snow"`.
A word is not its own anagram: for example, `"stop"` is not an anagram of `"stop"`.

Given `"listen"` and a list of candidates like `"enlists" "google"
"inlets" "banana"` the program should return a list containing
`"inlets"`.
Given a target word and a set of candidate words, this exercise requests the anagram set: the subset of the candidates that are anagrams of the target.

The target and candidates are words of one or more ASCII alphabetic characters (`A`-`Z` and `a`-`z`).
Lowercase and uppercase characters are equivalent: for example, `"PoTS"` is an anagram of `"sTOp"`, but `StoP` is not an anagram of `sTOp`.
The anagram set is the subset of the candidate set that are anagrams of the target (in any order).
Words in the anagram set should have the same letter case as in the candidate set.

Given the target `"stone"` and candidates `"stone"`, `"tones"`, `"banana"`, `"tons"`, `"notes"`, `"Seton"`, the anagram set is `"tones"`, `"notes"`, `"Seton"`.
2 changes: 1 addition & 1 deletion exercises/practice/armstrong-numbers/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Determine if a number is an Armstrong number",
"blurb": "Determine if a number is an Armstrong number.",
"authors": [
"ricemery"
],
Expand Down
7 changes: 4 additions & 3 deletions exercises/practice/atbash-cipher/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ Cipher: zyxwvutsrqponmlkjihgfedcba
```

It is a very weak cipher because it only has one possible key, and it is
a simple monoalphabetic substitution cipher. However, this may not have
a simple mono-alphabetic substitution cipher. However, this may not have
been an issue in the cipher's time.

Ciphertext is written out in groups of fixed length, the traditional group size
being 5 letters, and punctuation is excluded. This is to make it harder to guess
things based on word boundaries.
being 5 letters, leaving numbers unchanged, and punctuation is excluded.
This is to make it harder to guess things based on word boundaries.

## Examples

- Encoding `test` gives `gvhg`
- Encoding `x123 yes` gives `c123b vh`
- Decoding `gvhg` gives `test`
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
2 changes: 1 addition & 1 deletion exercises/practice/binary/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Convert a binary number, represented as a string (e.g. '101010'), to its decimal equivalent using first principles",
"blurb": "Convert a binary number, represented as a string (e.g. '101010'), to its decimal equivalent using first principles.",
"authors": [
"ricemery"
],
Expand Down
8 changes: 4 additions & 4 deletions exercises/practice/book-store/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ This would give a total of:

Resulting in:

- 5 x (8 - 2.00) == 5 x 6.00 == $30.00
- +3 x (8 - 0.80) == 3 x 7.20 == $21.60
- 5 × (8 - 2.00) = 5 × 6.00 = $30.00
- +3 × (8 - 0.80) = 3 × 7.20 = $21.60

For a total of $51.60

Expand All @@ -60,8 +60,8 @@ This would give a total of:

Resulting in:

- 4 x (8 - 1.60) == 4 x 6.40 == $25.60
- +4 x (8 - 1.60) == 4 x 6.40 == $25.60
- 4 × (8 - 1.60) = 4 × 6.40 = $25.60
- +4 × (8 - 1.60) = 4 × 6.40 = $25.60

For a total of $51.20

Expand Down
9 changes: 9 additions & 0 deletions exercises/practice/book-store/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,12 @@ description = "Three each of first 2 books and 2 each of remaining books"

[bb376344-4fb2-49ab-ab85-e38d8354a58d]
description = "Four groups of four are cheaper than two groups each of five and three"

[5260ddde-2703-4915-b45a-e54dbbac4303]
description = "Check that groups of four are created properly even when there are more groups of three than groups of five"

[b0478278-c551-4747-b0fc-7e0be3158b1f]
description = "One group of one and four is cheaper than one group of two and three"

[cf868453-6484-4ae1-9dfc-f8ee85bbde01]
description = "One group of one and two plus three groups of four is cheaper than one group of each size"
4 changes: 2 additions & 2 deletions exercises/practice/bowling/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Score a bowling game",
"blurb": "Score a bowling game.",
"authors": [
"ricemery"
],
Expand All @@ -18,6 +18,6 @@
".meta/Example.scala"
]
},
"source": "The Bowling Game Kata at but UncleBob",
"source": "The Bowling Game Kata from UncleBob",
"source_url": "http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata"
}
3 changes: 3 additions & 0 deletions exercises/practice/bowling/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ description = "rolling a spare with the two roll bonus does not get a bonus roll
[576faac1-7cff-4029-ad72-c16bcada79b5]
description = "strikes with the two roll bonus do not get bonus rolls"

[efb426ec-7e15-42e6-9b96-b4fca3ec2359]
description = "last two strikes followed by only last bonus with non strike points"

[72e24404-b6c6-46af-b188-875514c0377b]
description = "a strike with the one roll bonus after a spare in the last frame does not get a bonus"

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/change/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Correctly determine change to be given using the least number of coins",
"blurb": "Correctly determine change to be given using the least number of coins.",
"authors": [
"abo64"
],
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/collatz-conjecture/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Calculate the number of steps to reach 1 using the Collatz conjecture",
"blurb": "Calculate the number of steps to reach 1 using the Collatz conjecture.",
"authors": [],
"contributors": [
"ErikSchierboom",
Expand Down
10 changes: 10 additions & 0 deletions exercises/practice/collatz-conjecture/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ description = "large number of even and odd steps"

[7d4750e6-def9-4b86-aec7-9f7eb44f95a3]
description = "zero is an error"
include = false

[2187673d-77d6-4543-975e-66df6c50e2da]
description = "zero is an error"
reimplements = "7d4750e6-def9-4b86-aec7-9f7eb44f95a3"

[c6c795bf-a288-45e9-86a1-841359ad426d]
description = "negative value is an error"
include = false

[ec11f479-56bc-47fd-a434-bcd7a31a7a2e]
description = "negative value is an error"
reimplements = "c6c795bf-a288-45e9-86a1-841359ad426d"
4 changes: 2 additions & 2 deletions exercises/practice/complex-numbers/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Dividing a complex number `a + i * b` by another `c + i * d` gives:
Raising e to a complex exponent can be expressed as `e^(a + i * b) = e^a * e^(i * b)`, the last term of which is given by Euler's formula `e^(i * b) = cos(b) + i * sin(b)`.

Implement the following operations:
- addition, subtraction, multiplication and division of two complex numbers,
- conjugate, absolute value, exponent of a given complex number.

- addition, subtraction, multiplication and division of two complex numbers,
- conjugate, absolute value, exponent of a given complex number.

Assume the programming language you are using does not have an implementation of complex numbers.
24 changes: 24 additions & 0 deletions exercises/practice/complex-numbers/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,27 @@ description = "Complex exponential function -> Exponential of a purely real numb

[08eedacc-5a95-44fc-8789-1547b27a8702]
description = "Complex exponential function -> Exponential of a number with real and imaginary part"

[06d793bf-73bd-4b02-b015-3030b2c952ec]
description = "Operations between real numbers and complex numbers -> Add real number to complex number"

[d77dbbdf-b8df-43f6-a58d-3acb96765328]
description = "Operations between real numbers and complex numbers -> Add complex number to real number"

[20432c8e-8960-4c40-ba83-c9d910ff0a0f]
description = "Operations between real numbers and complex numbers -> Subtract real number from complex number"

[b4b38c85-e1bf-437d-b04d-49bba6e55000]
description = "Operations between real numbers and complex numbers -> Subtract complex number from real number"

[dabe1c8c-b8f4-44dd-879d-37d77c4d06bd]
description = "Operations between real numbers and complex numbers -> Multiply complex number by real number"

[6c81b8c8-9851-46f0-9de5-d96d314c3a28]
description = "Operations between real numbers and complex numbers -> Multiply real number by complex number"

[8a400f75-710e-4d0c-bcb4-5e5a00c78aa0]
description = "Operations between real numbers and complex numbers -> Divide complex number by real number"

[9a867d1b-d736-4c41-a41e-90bd148e9d5e]
description = "Operations between real numbers and complex numbers -> Divide real number by complex number"
2 changes: 1 addition & 1 deletion exercises/practice/connect/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Compute the result for a game of Hex / Polygon",
"blurb": "Compute the result for a game of Hex / Polygon.",
"authors": [
"ricemery"
],
Expand Down
17 changes: 11 additions & 6 deletions exercises/practice/crypto-square/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Implement the classic method for composing secret messages called a square code.
Given an English text, output the encoded version of that text.

First, the input is normalized: the spaces and punctuation are removed
from the English text and the message is downcased.
from the English text and the message is down-cased.

Then, the normalized characters are broken into rows. These rows can be
Then, the normalized characters are broken into rows. These rows can be
regarded as forming a rectangle when printed with intervening newlines.

For example, the sentence
Expand All @@ -22,10 +22,15 @@ is normalized to:
"ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots"
```

The plaintext should be organized in to a rectangle. The size of the
rectangle (`r x c`) should be decided by the length of the message,
such that `c >= r` and `c - r <= 1`, where `c` is the number of columns
and `r` is the number of rows.
The plaintext should be organized in to a rectangle. The size of the
rectangle should be decided by the length of the message.

If `c` is the number of columns and `r` is the number of rows, then for
the rectangle `r` x `c` find the smallest possible integer `c` such that:

- `r * c >= length(message)`,
- and `c >= r`,
- and `c - r <= 1`.

Our normalized text is 54 characters long, dictating a rectangle with
`c = 8` and `r = 7`:
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/darts/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Write a function that returns the earned points in a single toss of a Darts game",
"blurb": "Write a function that returns the earned points in a single toss of a Darts game.",
"authors": [
"ricemery"
],
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/dominoes/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Make a chain of dominoes.

Compute a way to order a given set of dominoes in such a way that they form a
correct domino chain (the dots on one half of a stone match the dots on the
neighbouring half of an adjacent stone) and that dots on the halves of the
stones which don't have a neighbour (the first and last stone) match each other.
neighboring half of an adjacent stone) and that dots on the halves of the
stones which don't have a neighbor (the first and last stone) match each other.

For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something
like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same.
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/flatten-array/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Take a nested list and return a single list with all values except nil/null",
"blurb": "Take a nested list and return a single list with all values except nil/null.",
"authors": [
"dmitryn"
],
Expand Down
15 changes: 15 additions & 0 deletions exercises/practice/flatten-array/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[8c71dabd-da60-422d-a290-4a571471fb14]
description = "empty"

[d268b919-963c-442d-9f07-82b93f1b518c]
description = "no nesting"

[3f15bede-c856-479e-bb71-1684b20c6a30]
description = "flattens a nested array"

[c84440cc-bb3a-48a6-862c-94cf23f2815d]
description = "flattens array with just integers present"

Expand All @@ -21,6 +27,15 @@ description = "5 level nesting"
[d572bdba-c127-43ed-bdcd-6222ac83d9f7]
description = "6 level nesting"

[0705a8e5-dc86-4cec-8909-150c5e54fa9c]
description = "null values are omitted from the final result"

[c6cf26de-8ccd-4410-84bd-b9efd88fd2bc]
description = "consecutive null values at the front of the list are omitted from the final result"

[382c5242-587e-4577-b8ce-a5fb51e385a1]
description = "consecutive null values in the middle of the list are omitted from the final result"

[ef1d4790-1b1e-4939-a179-51ace0829dbd]
description = "6 level nest list with null values"

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/food-chain/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'",
"blurb": "Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.",
"authors": [
"ricemery"
],
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/forth/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Implement an evaluator for a very simple subset of Forth",
"blurb": "Implement an evaluator for a very simple subset of Forth.",
"authors": [
"ricemery"
],
Expand Down
6 changes: 6 additions & 0 deletions exercises/practice/forth/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
[9962203f-f00a-4a85-b404-8a8ecbcec09d]
description = "parsing and numbers -> numbers just get pushed onto the stack"

[fd7a8da2-6818-4203-a866-fed0714e7aa0]
description = "parsing and numbers -> pushes negative numbers onto the stack"

[9e69588e-a3d8-41a3-a371-ea02206c1e6e]
description = "addition -> can add two numbers"

Expand Down Expand Up @@ -132,6 +135,9 @@ description = "user-defined words -> cannot redefine negative numbers"
[5180f261-89dd-491e-b230-62737e09806f]
description = "user-defined words -> errors if executing a non-existent word"

[3c8bfef3-edbb-49c1-9993-21d4030043cb]
description = "user-defined words -> only defines locally"

[7b83bb2e-b0e8-461f-ad3b-96ee2e111ed6]
description = "case-insensitivity -> DUP is case-insensitive"

Expand Down
7 changes: 5 additions & 2 deletions exercises/practice/grade-school/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ In the end, you should be able to:
and Jim in grade 5.
So the answer is: Anna, Barb, Charlie, Alex, Peter, Zoe and Jim"

Note that all our students only have one name. (It's a small town, what
do you want?)
Note that all our students only have one name (It's a small town, what
do you want?) and each student cannot be added more than once to a grade or the
roster.
In fact, when a test attempts to add the same student more than once, your
implementation should indicate that this is incorrect.

## For bonus points

Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/grade-school/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Given students' names along with the grade that they are in, create a roster for the school",
"blurb": "Given students' names along with the grade that they are in, create a roster for the school.",
"authors": [
"sgrif"
],
Expand Down
Loading

0 comments on commit 2711980

Please sign in to comment.