trackler 2.0.8.13 → 2.0.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/common/exercises/acronym/canonical-data.json +50 -39
- data/common/exercises/all-your-base/canonical-data.json +192 -146
- data/common/exercises/allergies/canonical-data.json +133 -93
- data/common/exercises/anagram/canonical-data.json +128 -106
- data/common/exercises/atbash-cipher/canonical-data.json +92 -74
- data/common/exercises/binary/canonical-data.json +94 -77
- data/common/exercises/bob/canonical-data.json +154 -127
- data/common/exercises/book-store/canonical-data.json +106 -92
- data/common/exercises/change/canonical-data.json +80 -68
- data/common/exercises/grains/canonical-data.json +75 -60
- data/common/exercises/hello-world/canonical-data.json +6 -6
- data/common/exercises/leap/canonical-data.json +28 -22
- data/common/exercises/luhn/canonical-data.json +16 -1
- data/common/exercises/pig-latin/canonical-data.json +93 -75
- data/common/exercises/raindrops/canonical-data.json +112 -92
- data/common/exercises/rna-transcription/canonical-data.json +64 -54
- data/common/exercises/run-length-encoding/canonical-data.json +20 -0
- data/common/exercises/run-length-encoding/description.md +3 -7
- data/common/exercises/say/canonical-data.json +98 -81
- data/common/exercises/scrabble-score/canonical-data.json +13 -0
- data/common/exercises/sieve/canonical-data.json +48 -42
- data/common/exercises/trinary/canonical-data.json +75 -60
- data/common/exercises/word-count/canonical-data.json +116 -54
- data/common/exercises/wordy/canonical-data.json +101 -83
- data/lib/trackler/version.rb +1 -1
- data/tracks/delphi/SETUP.md +10 -1
- data/tracks/delphi/config.json +8 -0
- data/tracks/delphi/docs/TESTS.md +4 -0
- data/tracks/delphi/exercises/hello-world/uTestHelloWorld.pas +49 -27
- data/tracks/delphi/exercises/triangle/Triangle.dpr +60 -0
- data/tracks/delphi/exercises/triangle/uTestTriangle.pas +186 -0
- data/tracks/delphi/exercises/triangle/uTriangleExample.pas +64 -0
- data/tracks/go/exercises/poker/poker_test.go +6 -6
- data/tracks/java/exercises/atbash-cipher/src/test/java/AtbashTest.java +2 -1
- data/tracks/scala/config.json +10 -0
- data/tracks/scala/exercises/variable-length-quantity/HINTS.md +2 -0
- data/tracks/scala/exercises/variable-length-quantity/build.sbt +3 -0
- data/tracks/scala/exercises/variable-length-quantity/example.scala +56 -0
- data/tracks/scala/exercises/variable-length-quantity/src/main/scala/VariableLengthQuantity.scala +0 -0
- data/tracks/scala/exercises/variable-length-quantity/src/test/scala/VariableLengthQuantityTest.scala +162 -0
- data/tracks/scala/testgen/src/main/scala/VariableLengthQuantityTestGenerator.scala +80 -0
- data/tracks/typescript/common/package.json +6 -7
- data/tracks/typescript/common/yarn.lock +422 -380
- data/tracks/typescript/config.json +12 -0
- data/tracks/typescript/exercises/anagram/package.json +6 -7
- data/tracks/typescript/exercises/anagram/yarn.lock +422 -380
- data/tracks/typescript/exercises/beer-song/package.json +6 -7
- data/tracks/typescript/exercises/beer-song/yarn.lock +422 -380
- data/tracks/typescript/exercises/bob/package.json +6 -7
- data/tracks/typescript/exercises/bob/yarn.lock +422 -380
- data/tracks/typescript/exercises/food-chain/package.json +6 -7
- data/tracks/typescript/exercises/food-chain/yarn.lock +422 -380
- data/tracks/typescript/exercises/gigasecond/package.json +6 -7
- data/tracks/typescript/exercises/gigasecond/yarn.lock +422 -380
- data/tracks/typescript/exercises/grade-school/grade-school.example.ts +31 -0
- data/tracks/typescript/exercises/grade-school/grade-school.test.ts +81 -0
- data/tracks/typescript/exercises/grade-school/package.json +36 -0
- data/tracks/typescript/exercises/grade-school/tsconfig.json +21 -0
- data/tracks/typescript/exercises/grade-school/tslint.json +127 -0
- data/tracks/typescript/exercises/grade-school/yarn.lock +2739 -0
- data/tracks/typescript/exercises/hamming/package.json +6 -7
- data/tracks/typescript/exercises/hamming/yarn.lock +422 -380
- data/tracks/typescript/exercises/hello-world/package.json +6 -7
- data/tracks/typescript/exercises/hello-world/yarn.lock +422 -380
- data/tracks/typescript/exercises/leap/package.json +6 -7
- data/tracks/typescript/exercises/leap/yarn.lock +422 -380
- data/tracks/typescript/exercises/pangram/package.json +6 -7
- data/tracks/typescript/exercises/pangram/yarn.lock +422 -380
- data/tracks/typescript/exercises/phone-number/package.json +6 -7
- data/tracks/typescript/exercises/phone-number/yarn.lock +422 -380
- data/tracks/typescript/exercises/rna-transcription/package.json +6 -7
- data/tracks/typescript/exercises/rna-transcription/yarn.lock +422 -380
- data/tracks/typescript/exercises/robot-name/package.json +36 -0
- data/tracks/typescript/exercises/robot-name/robot-name.example.ts +36 -0
- data/tracks/typescript/exercises/robot-name/robot-name.test.ts +86 -0
- data/tracks/typescript/exercises/robot-name/tsconfig.json +21 -0
- data/tracks/typescript/exercises/robot-name/tslint.json +127 -0
- data/tracks/typescript/exercises/robot-name/yarn.lock +2739 -0
- data/tracks/typescript/exercises/say/package.json +6 -7
- data/tracks/typescript/exercises/say/yarn.lock +422 -380
- data/tracks/typescript/exercises/word-count/package.json +6 -7
- data/tracks/typescript/exercises/word-count/yarn.lock +422 -380
- data/tracks/typescript/exercises/wordy/package.json +6 -7
- data/tracks/typescript/exercises/wordy/yarn.lock +422 -380
- metadata +23 -2
@@ -21,6 +21,16 @@
|
|
21
21
|
"description": "single characters mixed with repeated characters",
|
22
22
|
"input": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB",
|
23
23
|
"expected": "12WB12W3B24WB"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"description": "multiple whitespace mixed in string",
|
27
|
+
"input": " hsqq qww ",
|
28
|
+
"expected": "2 hs2q q2w2 "
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"description": "lowercase characters",
|
32
|
+
"input": "aabbbcccc",
|
33
|
+
"expected": "2a3b4c"
|
24
34
|
}
|
25
35
|
]
|
26
36
|
},
|
@@ -46,6 +56,16 @@
|
|
46
56
|
"description": "single characters with repeated characters",
|
47
57
|
"input": "12WB12W3B24WB",
|
48
58
|
"expected": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"description": "multiple whitespace mixed in string",
|
62
|
+
"input": "2 hs2q q2w2 ",
|
63
|
+
"expected": " hsqq qww "
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"description": "lower case string",
|
67
|
+
"input": "2a3b4c",
|
68
|
+
"expected": "aabbbcccc"
|
49
69
|
}
|
50
70
|
]
|
51
71
|
},
|
@@ -14,11 +14,7 @@ the compressed data, which makes it a lossless data compression.
|
|
14
14
|
"AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE"
|
15
15
|
```
|
16
16
|
|
17
|
-
If the string contains any whitespace, it should be passed through unchanged:
|
18
|
-
|
19
|
-
```
|
20
|
-
"aabc dddef" -> "2abc 3def"
|
21
|
-
```
|
22
|
-
|
23
17
|
For simplicity, you can assume that the unencoded string will only contain
|
24
|
-
the letters A through Z (either lower or
|
18
|
+
the letters A through Z (either lower or upper case) and whitespace. This way
|
19
|
+
data to be encoded will never contain any numbers and numbers inside data to
|
20
|
+
be decoded always represent the count for the following character.
|
@@ -1,83 +1,100 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
2
|
+
"exercise": "say",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
5
|
+
"Here -1 is used as expected value to indicate that the",
|
6
|
+
"input value is out of the range described in the exercise."
|
7
|
+
],
|
8
|
+
"cases": [
|
9
|
+
{
|
10
|
+
"description": "zero",
|
11
|
+
"property": "say",
|
12
|
+
"input": 0,
|
13
|
+
"expected": "zero"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"description": "one",
|
17
|
+
"property": "say",
|
18
|
+
"input": 1,
|
19
|
+
"expected": "one"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"description": "fourteen",
|
23
|
+
"property": "say",
|
24
|
+
"input": 14,
|
25
|
+
"expected": "fourteen"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"description": "twenty",
|
29
|
+
"property": "say",
|
30
|
+
"input": 20,
|
31
|
+
"expected": "twenty"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"description": "twenty-two",
|
35
|
+
"property": "say",
|
36
|
+
"input": 22,
|
37
|
+
"expected": "twenty-two"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"description": "one hundred",
|
41
|
+
"property": "say",
|
42
|
+
"input": 100,
|
43
|
+
"expected": "one hundred"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"description": "one hundred twenty-three",
|
47
|
+
"property": "say",
|
48
|
+
"input": 123,
|
49
|
+
"expected": "one hundred twenty-three"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"description": "one thousand",
|
53
|
+
"property": "say",
|
54
|
+
"input": 1000,
|
55
|
+
"expected": "one thousand"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"description": "one thousand two hundred thirty-four",
|
59
|
+
"property": "say",
|
60
|
+
"input": 1234,
|
61
|
+
"expected": "one thousand two hundred thirty-four"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"description": "one million",
|
65
|
+
"property": "say",
|
66
|
+
"input": 1000000,
|
67
|
+
"expected": "one million"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"description": "one million two thousand three hundred forty-five",
|
71
|
+
"property": "say",
|
72
|
+
"input": 1002345,
|
73
|
+
"expected": "one million two thousand three hundred forty-five"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"description": "one billion",
|
77
|
+
"property": "say",
|
78
|
+
"input": 1000000000,
|
79
|
+
"expected": "one billion"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"description": "a big number",
|
83
|
+
"property": "say",
|
84
|
+
"input": 987654321123,
|
85
|
+
"expected": "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"description": "numbers below zero are out of range",
|
89
|
+
"property": "say",
|
90
|
+
"input": -1,
|
91
|
+
"expected": -1
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"description": "numbers above 999,999,999,999 are out of range",
|
95
|
+
"property": "say",
|
96
|
+
"input": 1000000000000,
|
97
|
+
"expected": -1
|
98
|
+
}
|
99
|
+
]
|
83
100
|
}
|
@@ -1,57 +1,70 @@
|
|
1
1
|
{
|
2
|
+
"exercise": "scrabble-score",
|
3
|
+
"version": "1.0.0",
|
2
4
|
"cases": [
|
3
5
|
{
|
4
6
|
"description": "lowercase letter",
|
7
|
+
"property": "score",
|
5
8
|
"input": "a",
|
6
9
|
"expected": 1
|
7
10
|
},
|
8
11
|
{
|
9
12
|
"description": "uppercase letter",
|
13
|
+
"property": "score",
|
10
14
|
"input": "A",
|
11
15
|
"expected": 1
|
12
16
|
},
|
13
17
|
{
|
14
18
|
"description": "valuable letter",
|
19
|
+
"property": "score",
|
15
20
|
"input": "f",
|
16
21
|
"expected": 4
|
17
22
|
},
|
18
23
|
{
|
19
24
|
"description": "short word",
|
25
|
+
"property": "score",
|
20
26
|
"input": "at",
|
21
27
|
"expected": 2
|
22
28
|
},
|
23
29
|
{
|
24
30
|
"description": "short, valuable word",
|
31
|
+
"property": "score",
|
25
32
|
"input": "zoo",
|
26
33
|
"expected": 12
|
27
34
|
},
|
28
35
|
{
|
29
36
|
"description": "medium word",
|
37
|
+
"property": "score",
|
30
38
|
"input": "street",
|
31
39
|
"expected": 6
|
32
40
|
},
|
33
41
|
{
|
34
42
|
"description": "medium, valuable word",
|
43
|
+
"property": "score",
|
35
44
|
"input": "quirky",
|
36
45
|
"expected": 22
|
37
46
|
},
|
38
47
|
{
|
39
48
|
"description": "long, mixed-case word",
|
49
|
+
"property": "score",
|
40
50
|
"input": "OxyphenButazone",
|
41
51
|
"expected": 41
|
42
52
|
},
|
43
53
|
{
|
44
54
|
"description": "english-like word",
|
55
|
+
"property": "score",
|
45
56
|
"input": "pinata",
|
46
57
|
"expected": 8
|
47
58
|
},
|
48
59
|
{
|
49
60
|
"description": "empty input",
|
61
|
+
"property": "score",
|
50
62
|
"input": "",
|
51
63
|
"expected": 0
|
52
64
|
},
|
53
65
|
{
|
54
66
|
"description": "entire alphabet available",
|
67
|
+
"property": "score",
|
55
68
|
"input": "abcdefghijklmnopqrstuvwxyz",
|
56
69
|
"expected": 87
|
57
70
|
}
|
@@ -1,43 +1,49 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
1
|
+
{
|
2
|
+
"exercise": "sieve",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "no primes under two",
|
7
|
+
"property": "primes",
|
8
|
+
"limit": 1,
|
9
|
+
"expected": []
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"description": "find first prime",
|
13
|
+
"property": "primes",
|
14
|
+
"limit": 2,
|
15
|
+
"expected": [2]
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"description": "find primes up to 10",
|
19
|
+
"property": "primes",
|
20
|
+
"limit": 10,
|
21
|
+
"expected": [2, 3, 5, 7]
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"description": "limit is prime",
|
25
|
+
"property": "primes",
|
26
|
+
"limit": 13,
|
27
|
+
"expected": [2, 3, 5, 7, 11, 13]
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"description": "find primes up to 1000",
|
31
|
+
"property": "primes",
|
32
|
+
"limit": 1000,
|
33
|
+
"expected": [
|
34
|
+
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
|
35
|
+
47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107,
|
36
|
+
109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181,
|
37
|
+
191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
|
38
|
+
269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
|
39
|
+
353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
|
40
|
+
439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521,
|
41
|
+
523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613,
|
42
|
+
617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
|
43
|
+
709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
|
44
|
+
811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887,
|
45
|
+
907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
|
46
|
+
]
|
47
|
+
}
|
48
|
+
]
|
43
49
|
}
|
@@ -1,62 +1,77 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
2
|
+
"exercise": "trinary",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "returns the decimal representation of the input trinary value",
|
7
|
+
"cases": [
|
8
|
+
{
|
9
|
+
"description": "trinary 1 is decimal 1",
|
10
|
+
"property": "toDecimal",
|
11
|
+
"input": 1,
|
12
|
+
"expected": 1
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"description": "trinary 2 is decimal 2",
|
16
|
+
"property": "toDecimal",
|
17
|
+
"input": 2,
|
18
|
+
"expected": 2
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"description": "trinary 10 is decimal 3",
|
22
|
+
"property": "toDecimal",
|
23
|
+
"input": 10,
|
24
|
+
"expected": 3
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"description": "trinary 11 is decimal 4",
|
28
|
+
"property": "toDecimal",
|
29
|
+
"input": 11,
|
30
|
+
"expected": 4
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "trinary 100 is decimal 9",
|
34
|
+
"property": "toDecimal",
|
35
|
+
"input": 100,
|
36
|
+
"expected": 9
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"description": "trinary 112 is decimal 14",
|
40
|
+
"property": "toDecimal",
|
41
|
+
"input": 112,
|
42
|
+
"expected": 14
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"description": "trinary 222 is decimal 26",
|
46
|
+
"property": "toDecimal",
|
47
|
+
"input": 222,
|
48
|
+
"expected": 26
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"description": "trinary 1122000120 is decimal 32091",
|
52
|
+
"property": "toDecimal",
|
53
|
+
"input": 1122000120,
|
54
|
+
"expected": 32091
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"description": "invalid trinary digits returns 0",
|
58
|
+
"property": "toDecimal",
|
59
|
+
"input": "1234",
|
60
|
+
"expected": 0
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"description": "invalid word as input returns 0",
|
64
|
+
"property": "toDecimal",
|
65
|
+
"input": "carrot",
|
66
|
+
"expected": 0
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"description": "invalid numbers with letters as input returns 0",
|
70
|
+
"property": "toDecimal",
|
71
|
+
"input": "0a1b2c",
|
72
|
+
"expected": 0
|
73
|
+
}
|
74
|
+
]
|
75
|
+
}
|
76
|
+
]
|
62
77
|
}
|