Skip to content

Commit f3b4822

Browse files
committed
Syncing tests, filepaths, methdata and docs with problem-specification repocitory
1 parent 3a0a219 commit f3b4822

File tree

17 files changed

+204
-40
lines changed

17 files changed

+204
-40
lines changed

exercises/practice/bob/.meta/tests.toml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[e162fead-606f-437a-a166-d051915cea8e]
613
description = "stating something"
@@ -64,6 +71,7 @@ description = "alternate silence"
6471

6572
[66953780-165b-4e7e-8ce3-4bcb80b6385a]
6673
description = "multiple line question"
74+
include = false
6775

6876
[5371ef75-d9ea-4103-bcfa-2da973ddec1b]
6977
description = "starting with whitespace"
@@ -76,3 +84,7 @@ description = "other whitespace"
7684

7785
[12983553-8601-46a8-92fa-fcaa3bc4a2a0]
7886
description = "non-question ending with whitespace"
87+
88+
[2c7278ac-f955-4eb4-bf8f-e33eb4116a15]
89+
description = "multiple line question"
90+
reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a"

exercises/practice/dot-dsl/.meta/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
"editor": [
1717
"src/main/java/Node.java",
1818
"src/main/java/Edge.java"
19+
],
20+
"invalidator": [
21+
"build.gradle"
1922
]
2023
},
2124
"blurb": "Write a Domain Specific Language similar to the Graphviz dot language.",

exercises/practice/forth/.meta/tests.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ description = "addition -> errors if there is nothing on the stack"
2424
[06efb9a4-817a-435e-b509-06166993c1b8]
2525
description = "addition -> errors if there is only one value on the stack"
2626

27+
[1e07a098-c5fa-4c66-97b2-3c81205dbc2f]
28+
description = "addition -> more than two values on the stack"
29+
2730
[09687c99-7bbc-44af-8526-e402f997ccbf]
2831
description = "subtraction -> can subtract two numbers"
2932

@@ -33,6 +36,9 @@ description = "subtraction -> errors if there is nothing on the stack"
3336
[b3cee1b2-9159-418a-b00d-a1bb3765c23b]
3437
description = "subtraction -> errors if there is only one value on the stack"
3538

39+
[2c8cc5ed-da97-4cb1-8b98-fa7b526644f4]
40+
description = "subtraction -> more than two values on the stack"
41+
3642
[5df0ceb5-922e-401f-974d-8287427dbf21]
3743
description = "multiplication -> can multiply two numbers"
3844

@@ -42,6 +48,9 @@ description = "multiplication -> errors if there is nothing on the stack"
4248
[8ba4b432-9f94-41e0-8fae-3b3712bd51b3]
4349
description = "multiplication -> errors if there is only one value on the stack"
4450

51+
[5cd085b5-deb1-43cc-9c17-6b1c38bc9970]
52+
description = "multiplication -> more than two values on the stack"
53+
4554
[e74c2204-b057-4cff-9aa9-31c7c97a93f5]
4655
description = "division -> can divide two numbers"
4756

@@ -57,12 +66,21 @@ description = "division -> errors if there is nothing on the stack"
5766
[d5547f43-c2ff-4d5c-9cb0-2a4f6684c20d]
5867
description = "division -> errors if there is only one value on the stack"
5968

69+
[f224f3e0-b6b6-4864-81de-9769ecefa03f]
70+
description = "division -> more than two values on the stack"
71+
6072
[ee28d729-6692-4a30-b9be-0d830c52a68c]
6173
description = "combined arithmetic -> addition and subtraction"
6274

6375
[40b197da-fa4b-4aca-a50b-f000d19422c1]
6476
description = "combined arithmetic -> multiplication and division"
6577

78+
[f749b540-53aa-458e-87ec-a70797eddbcb]
79+
description = "combined arithmetic -> multiplication and addition"
80+
81+
[c8e5a4c2-f9bf-4805-9a35-3c3314e4989a]
82+
description = "combined arithmetic -> addition and multiplication"
83+
6684
[c5758235-6eef-4bf6-ab62-c878e50b9957]
6785
description = "dup -> copies a value on the stack"
6886

exercises/practice/hamming/.docs/instructions.md

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

3-
Calculate the Hamming Distance between two DNA strands.
3+
Calculate the Hamming distance between two DNA strands.
44

55
Your body is made up of cells that contain DNA.
66
Those cells regularly wear out and need replacing, which they achieve by dividing into daughter cells.
@@ -9,18 +9,18 @@ In fact, the average human body experiences about 10 quadrillion cell divisions
99
When cells divide, their DNA replicates too.
1010
Sometimes during this process mistakes happen and single pieces of DNA get encoded with the incorrect information.
1111
If we compare two strands of DNA and count the differences between them we can see how many mistakes occurred.
12-
This is known as the "Hamming Distance".
12+
This is known as the "Hamming distance".
1313

14-
We read DNA using the letters C,A,G and T.
14+
We read DNA using the letters C, A, G and T.
1515
Two strands might look like this:
1616

1717
GAGCCTACTAACGGGAT
1818
CATCGTAATGACGGCCT
1919
^ ^ ^ ^ ^ ^^
2020

21-
They have 7 differences, and therefore the Hamming Distance is 7.
21+
They have 7 differences, and therefore the Hamming distance is 7.
2222

23-
The Hamming Distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :)
23+
The Hamming distance is useful for lots of things in science, not just biology, so it's a nice phrase to be familiar with :)
2424

2525
## Implementation notes
2626

exercises/practice/hamming/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"build.gradle"
4444
]
4545
},
46-
"blurb": "Calculate the Hamming difference between two DNA strands.",
46+
"blurb": "Calculate the Hamming distance between two DNA strands.",
4747
"source": "The Calculating Point Mutations problem at Rosalind",
4848
"source_url": "https://rosalind.info/problems/hamm/"
4949
}

exercises/practice/luhn/.docs/instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ The first step of the Luhn algorithm is to double every second digit, starting f
2222
We will be doubling
2323

2424
```text
25-
4_3_ 3_9_ 0_4_ 6_6_
25+
4539 3195 0343 6467
26+
↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ (double these)
2627
```
2728

2829
If doubling the number results in a number greater than 9 then subtract 9 from the product.

exercises/practice/palindrome-products/.meta/tests.toml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[5cff78fe-cf02-459d-85c2-ce584679f887]
6-
description = "finds the smallest palindrome from single digit factors"
13+
description = "find the smallest palindrome from single digit factors"
714

815
[0853f82c-5fc4-44ae-be38-fadb2cced92d]
9-
description = "finds the largest palindrome from single digit factors"
16+
description = "find the largest palindrome from single digit factors"
1017

1118
[66c3b496-bdec-4103-9129-3fcb5a9063e1]
1219
description = "find the smallest palindrome from double digit factors"
@@ -15,13 +22,13 @@ description = "find the smallest palindrome from double digit factors"
1522
description = "find the largest palindrome from double digit factors"
1623

1724
[cecb5a35-46d1-4666-9719-fa2c3af7499d]
18-
description = "find smallest palindrome from triple digit factors"
25+
description = "find the smallest palindrome from triple digit factors"
1926

2027
[edab43e1-c35f-4ea3-8c55-2f31dddd92e5]
2128
description = "find the largest palindrome from triple digit factors"
2229

2330
[4f802b5a-9d74-4026-a70f-b53ff9234e4e]
24-
description = "find smallest palindrome from four digit factors"
31+
description = "find the smallest palindrome from four digit factors"
2532

2633
[787525e0-a5f9-40f3-8cb2-23b52cf5d0be]
2734
description = "find the largest palindrome from four digit factors"
@@ -37,3 +44,6 @@ description = "error result for smallest if min is more than max"
3744

3845
[eeeb5bff-3f47-4b1e-892f-05829277bd74]
3946
description = "error result for largest if min is more than max"
47+
48+
[16481711-26c4-42e0-9180-e2e4e8b29c23]
49+
description = "smallest product does not use the smallest factor"

exercises/practice/poker/.meta/tests.toml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[161f485e-39c2-4012-84cf-bec0c755b66c]
613
description = "single hand always wins"
@@ -14,12 +21,18 @@ description = "a tie has multiple winners"
1421
[61ed83a9-cfaa-40a5-942a-51f52f0a8725]
1522
description = "multiple hands with the same high cards, tie compares next highest ranked, down to last card"
1623

24+
[da01becd-f5b0-4342-b7f3-1318191d0580]
25+
description = "winning high card hand also has the lowest card"
26+
1727
[f7175a89-34ff-44de-b3d7-f6fd97d1fca4]
1828
description = "one pair beats high card"
1929

2030
[e114fd41-a301-4111-a9e7-5a7f72a76561]
2131
description = "highest pair wins"
2232

33+
[b3acd3a7-f9fa-4647-85ab-e0a9e07d1365]
34+
description = "both hands have the same pair, high card wins"
35+
2336
[935bb4dc-a622-4400-97fa-86e7d06b1f76]
2437
description = "two pairs beats one pair"
2538

@@ -32,6 +45,12 @@ description = "both hands have two pairs, with the same highest ranked pair, tie
3245
[15a7a315-0577-47a3-9981-d6cf8e6f387b]
3346
description = "both hands have two identically ranked pairs, tie goes to remaining card (kicker)"
3447

48+
[f761e21b-2560-4774-a02a-b3e9366a51ce]
49+
description = "both hands have two pairs that add to the same value, win goes to highest pair"
50+
51+
[fc6277ac-94ac-4078-8d39-9d441bc7a79e]
52+
description = "two pairs first ranked by largest pair"
53+
3554
[21e9f1e6-2d72-49a1-a930-228e5e0195dc]
3655
description = "three of a kind beats two pair"
3756

@@ -40,6 +59,11 @@ description = "both hands have three of a kind, tie goes to highest ranked tripl
4059

4160
[eb856cc2-481c-4b0d-9835-4d75d07a5d9d]
4261
description = "with multiple decks, two players can have same three of a kind, ties go to highest remaining cards"
62+
include = false
63+
64+
[26a4a7d4-34a2-4f18-90b4-4a8dd35d2bb1]
65+
description = "with multiple decks, two players can have same three of a kind, ties go to highest remaining cards"
66+
reimplements = "eb856cc2-481c-4b0d-9835-4d75d07a5d9d"
4367

4468
[a858c5d9-2f28-48e7-9980-b7fa04060a60]
4569
description = "a straight beats three of a kind"
@@ -50,6 +74,9 @@ description = "aces can end a straight (10 J Q K A)"
5074
[76856b0d-35cd-49ce-a492-fe5db53abc02]
5175
description = "aces can start a straight (A 2 3 4 5)"
5276

77+
[e214b7df-dcba-45d3-a2e5-342d8c46c286]
78+
description = "aces cannot be in the middle of a straight (Q K A 2 3)"
79+
5380
[6980c612-bbff-4914-b17a-b044e4e69ea1]
5481
description = "both hands with a straight, tie goes to highest ranked card"
5582

@@ -61,6 +88,11 @@ description = "flush beats a straight"
6188

6289
[4d90261d-251c-49bd-a468-896bf10133de]
6390
description = "both hands have a flush, tie goes to high card, down to the last one if necessary"
91+
include = false
92+
93+
[e04137c5-c19a-4dfc-97a1-9dfe9baaa2ff]
94+
description = "both hands have a flush, tie goes to high card, down to the last one if necessary"
95+
reimplements = "4d90261d-251c-49bd-a468-896bf10133de"
6496

6597
[3a19361d-8974-455c-82e5-f7152f5dba7c]
6698
description = "full house beats a flush"
@@ -83,5 +115,17 @@ description = "with multiple decks, both hands with identical four of a kind, ti
83115
[923bd910-dc7b-4f7d-a330-8b42ec10a3ac]
84116
description = "straight flush beats four of a kind"
85117

118+
[d9629e22-c943-460b-a951-2134d1b43346]
119+
description = "aces can end a straight flush (10 J Q K A)"
120+
121+
[05d5ede9-64a5-4678-b8ae-cf4c595dc824]
122+
description = "aces can start a straight flush (A 2 3 4 5)"
123+
124+
[ad655466-6d04-49e8-a50c-0043c3ac18ff]
125+
description = "aces cannot be in the middle of a straight flush (Q K A 2 3)"
126+
86127
[d0927f70-5aec-43db-aed8-1cbd1b6ee9ad]
87-
description = "both hands have straight flush, tie goes to highest-ranked card"
128+
description = "both hands have a straight flush, tie goes to highest-ranked card"
129+
130+
[be620e09-0397-497b-ac37-d1d7a4464cfc]
131+
description = "even though an ace is usually high, a 5-high straight flush is the lowest-scoring straight flush"

exercises/practice/pov/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Reparent a graph on a selected node.",
2020
"source": "Adaptation of exercise from 4clojure",
21-
"source_url": "https://www.4clojure.com/"
21+
"source_url": "https://github.com/oxalorg/4ever-clojure"
2222
}

exercises/practice/rna-transcription/.docs/instructions.md

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

3-
Your task is determine the RNA complement of a given DNA sequence.
3+
Your task is to determine the RNA complement of a given DNA sequence.
44

55
Both DNA and RNA strands are a sequence of nucleotides.
66

7-
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**), guanine (**G**) and thymine (**T**).
7+
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**), guanine (**G**), and thymine (**T**).
88

9-
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**), guanine (**G**) and uracil (**U**).
9+
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**), guanine (**G**), and uracil (**U**).
1010

1111
Given a DNA strand, its transcribed RNA strand is formed by replacing each nucleotide with its complement:
1212

0 commit comments

Comments
 (0)