trackler 2.0.8.16 → 2.0.8.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/exercises/alphametics/canonical-data.json +100 -44
- data/common/exercises/anagram/canonical-data.json +3 -3
- data/common/exercises/beer-song/canonical-data.json +75 -47
- data/common/exercises/binary-search/canonical-data.json +86 -74
- data/common/exercises/bowling/canonical-data.json +1 -1
- data/common/exercises/bracket-push/canonical-data.json +15 -0
- data/common/exercises/circular-buffer/canonical-data.json +16 -1
- data/common/exercises/connect/canonical-data.json +19 -7
- data/common/exercises/custom-set/canonical-data.json +287 -246
- data/common/exercises/dominoes/canonical-data.json +125 -111
- data/common/exercises/flatten-array/canonical-data.json +35 -28
- data/common/exercises/food-chain/canonical-data.json +196 -182
- data/common/exercises/gigasecond/canonical-data.json +51 -41
- data/common/exercises/isogram/canonical-data.json +59 -38
- data/common/exercises/pangram/canonical-data.json +69 -47
- data/common/exercises/perfect-numbers/canonical-data.json +3 -3
- data/common/exercises/phone-number/canonical-data.json +74 -55
- data/common/exercises/sum-of-multiples/canonical-data.json +88 -62
- data/lib/trackler/version.rb +1 -1
- data/tracks/elixir/docs/INSTALLATION.md +2 -0
- data/tracks/elixir/docs/LEARNING.md +2 -0
- data/tracks/elixir/docs/RESOURCES.md +8 -0
- data/tracks/groovy/docs/ABOUT.md +1 -1
- data/tracks/groovy/docs/LEARNING.md +5 -4
- data/tracks/groovy/docs/RESOURCES.md +8 -1
- data/tracks/rust/exercises/hello-world/GETTING_STARTED.md +29 -97
- metadata +1 -1
@@ -1,45 +1,55 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
"exercise": "gigasecond",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"comments": [
|
5
|
+
"The basic test is to add one gigasecond to a few ordinary dates.",
|
6
|
+
"Most test programs currently check only the date and ignore the time.",
|
7
|
+
"For languages with a native date-time type though, expected times",
|
8
|
+
"here show the correct seconds, ignoring leap seconds.",
|
9
|
+
"The date and time formats here are per",
|
10
|
+
"http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.",
|
11
|
+
"",
|
12
|
+
"Finally, as a demonstration but not really a test,",
|
13
|
+
"some languages demonstrate the add function by inviting the",
|
14
|
+
"solver to include their birthdate in either the solution code",
|
15
|
+
"or test program. The test program then shows or tests their",
|
16
|
+
"gigasecond anniversary."
|
17
|
+
],
|
18
|
+
"cases": [
|
19
|
+
{
|
20
|
+
"description": "Add one gigasecond to the input.",
|
20
21
|
"cases": [
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
22
|
+
{
|
23
|
+
"description": "date only specification of time",
|
24
|
+
"property": "add",
|
25
|
+
"input": "2011-04-25",
|
26
|
+
"expected": "2043-01-01T01:46:40"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"description": "second test for date only specification of time",
|
30
|
+
"property": "add",
|
31
|
+
"input": "1977-06-13",
|
32
|
+
"expected": "2009-02-19T01:46:40"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"description": "third test for date only specification of time",
|
36
|
+
"property": "add",
|
37
|
+
"input": "1959-07-19",
|
38
|
+
"expected": "1991-03-27T01:46:40"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"description": "full time specified",
|
42
|
+
"property": "add",
|
43
|
+
"input": "2015-01-24T22:00:00",
|
44
|
+
"expected": "2046-10-02T23:46:40"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"description": "full time with day roll-over",
|
48
|
+
"property": "add",
|
49
|
+
"input": "2015-01-24T23:59:59",
|
50
|
+
"expected": "2046-10-03T01:46:39"
|
51
|
+
}
|
43
52
|
]
|
44
|
-
|
53
|
+
}
|
54
|
+
]
|
45
55
|
}
|
@@ -1,44 +1,65 @@
|
|
1
1
|
{
|
2
|
+
"exercise": "isogram",
|
3
|
+
"comments": [
|
4
|
+
"An isogram is a word or phrase without a repeating letter."
|
5
|
+
],
|
6
|
+
"version": "1.0.0",
|
2
7
|
"cases": [
|
3
8
|
{
|
4
|
-
"description": "
|
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
|
-
|
9
|
+
"description": "Check if the given string is an isogram",
|
10
|
+
"comments": [
|
11
|
+
"Output should be a boolean denoting if the string is a isogram or not."
|
12
|
+
],
|
13
|
+
"cases": [
|
14
|
+
{
|
15
|
+
"description": "empty string",
|
16
|
+
"property": "isIsogram",
|
17
|
+
"input": "",
|
18
|
+
"expected": true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"description": "isogram with only lower case characters",
|
22
|
+
"property": "isIsogram",
|
23
|
+
"input": "isogram",
|
24
|
+
"expected": true
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"description": "word with one duplicated character",
|
28
|
+
"property": "isIsogram",
|
29
|
+
"input": "eleven",
|
30
|
+
"expected": false
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "longest reported english isogram",
|
34
|
+
"property": "isIsogram",
|
35
|
+
"input": "subdermatoglyphic",
|
36
|
+
"expected": true
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"description": "word with duplicated character in mixed case",
|
40
|
+
"property": "isIsogram",
|
41
|
+
"input": "Alphabet",
|
42
|
+
"expected": false
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"description": "hypothetical isogrammic word with hyphen",
|
46
|
+
"property": "isIsogram",
|
47
|
+
"input": "thumbscrew-japingly",
|
48
|
+
"expected": true
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"description": "isogram with duplicated non letter character",
|
52
|
+
"property": "isIsogram",
|
53
|
+
"input": "Hjelmqvist-Gryb-Zock-Pfund-Wax",
|
54
|
+
"expected": true
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"description": "made-up name that is an isogram",
|
58
|
+
"property": "isIsogram",
|
59
|
+
"input": "Emily Jung Schwartzkopf",
|
60
|
+
"expected": true
|
61
|
+
}
|
62
|
+
]
|
42
63
|
}
|
43
64
|
]
|
44
65
|
}
|
@@ -1,49 +1,71 @@
|
|
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
|
-
|
2
|
+
"exercise": "pangram",
|
3
|
+
"comments": [
|
4
|
+
"A pangram is a sentence using every letter of the alphabet at least once."
|
5
|
+
],
|
6
|
+
"version": "1.0.0",
|
7
|
+
"cases": [
|
8
|
+
{
|
9
|
+
"description": "Check if the given string is an pangram",
|
10
|
+
"comments": [
|
11
|
+
"Output should be a boolean denoting if the string is a pangram or not."
|
12
|
+
],
|
13
|
+
"cases": [
|
14
|
+
{
|
15
|
+
"description": "sentence empty",
|
16
|
+
"property": "isPangram",
|
17
|
+
"input": "",
|
18
|
+
"expected": false
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"description": "pangram with only lower case",
|
22
|
+
"property": "isPangram",
|
23
|
+
"input": "the quick brown fox jumps over the lazy dog",
|
24
|
+
"expected": true
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"description": "missing character 'x'",
|
28
|
+
"property": "isPangram",
|
29
|
+
"input": "a quick movement of the enemy will jeopardize five gunboats",
|
30
|
+
"expected": false
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"description": "another missing character 'x'",
|
34
|
+
"property": "isPangram",
|
35
|
+
"input": "the quick brown fish jumps over the lazy dog",
|
36
|
+
"expected": false
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"description": "pangram with underscores",
|
40
|
+
"property": "isPangram",
|
41
|
+
"input": "the_quick_brown_fox_jumps_over_the_lazy_dog",
|
42
|
+
"expected": true
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"description": "pangram with numbers",
|
46
|
+
"property": "isPangram",
|
47
|
+
"input": "the 1 quick brown fox jumps over the 2 lazy dogs",
|
48
|
+
"expected": true
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"description": "missing letters replaced by numbers",
|
52
|
+
"property": "isPangram",
|
53
|
+
"input": "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog",
|
54
|
+
"expected": false
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"description": "pangram with mixed case and punctuation",
|
58
|
+
"property": "isPangram",
|
59
|
+
"input": "\"Five quacking Zephyrs jolt my wax bed.\"",
|
60
|
+
"expected": true
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"description": "upper and lower case versions of the same character should not be counted separately",
|
64
|
+
"property": "isPangram",
|
65
|
+
"input": "the quick brown fox jumped over the lazy FOX",
|
66
|
+
"expected": false
|
67
|
+
}
|
68
|
+
]
|
69
|
+
}
|
70
|
+
]
|
49
71
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "perfect-numbers",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"cases": [
|
5
5
|
{
|
6
6
|
"description": "Perfect numbers",
|
@@ -87,7 +87,7 @@
|
|
87
87
|
"description": "Invalid inputs",
|
88
88
|
"cases": [
|
89
89
|
{
|
90
|
-
"description": "
|
90
|
+
"description": "Zero is rejected (not a natural number)",
|
91
91
|
"property": "classify",
|
92
92
|
"input": 0,
|
93
93
|
"expected": {
|
@@ -105,4 +105,4 @@
|
|
105
105
|
]
|
106
106
|
}
|
107
107
|
]
|
108
|
-
}
|
108
|
+
}
|
@@ -1,57 +1,76 @@
|
|
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
|
-
|
2
|
+
"exercise": "phone-number",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"cases": [
|
5
|
+
{
|
6
|
+
"description": "Cleanup user-entered phone numbers",
|
7
|
+
"comments": [
|
8
|
+
" Returns the cleaned phone number if given number is valid, "
|
9
|
+
, " else returns nil. Note that number is not formatted, "
|
10
|
+
, " just a 10-digit number is returned. "
|
11
|
+
],
|
12
|
+
"cases": [
|
13
|
+
{
|
14
|
+
"description": "cleans the number",
|
15
|
+
"property": "clean",
|
16
|
+
"phrase": "(123) 456-7890",
|
17
|
+
"expected": "1234567890"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"description": "cleans numbers with dots",
|
21
|
+
"property": "clean",
|
22
|
+
"phrase": "123.456.7890",
|
23
|
+
"expected": "1234567890"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"description": "cleans numbers with multiple spaces",
|
27
|
+
"property": "clean",
|
28
|
+
"phrase": "123 456 7890 ",
|
29
|
+
"expected": "1234567890"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"description": "invalid when 9 digits",
|
33
|
+
"property": "clean",
|
34
|
+
"phrase": "123456789",
|
35
|
+
"expected": null
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"description": "invalid when 11 digits",
|
39
|
+
"property": "clean",
|
40
|
+
"phrase": "21234567890",
|
41
|
+
"expected": null
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"description": "valid when 11 digits and starting with 1",
|
45
|
+
"property": "clean",
|
46
|
+
"phrase": "11234567890",
|
47
|
+
"expected": "1234567890"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"description": "invalid when 12 digits",
|
51
|
+
"property": "clean",
|
52
|
+
"phrase": "321234567890",
|
53
|
+
"expected": null
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"description": "invalid with letters",
|
57
|
+
"property": "clean",
|
58
|
+
"phrase": "123-abc-7890",
|
59
|
+
"expected": null
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"description": "invalid with punctuations",
|
63
|
+
"property": "clean",
|
64
|
+
"phrase": "123-@:!-7890",
|
65
|
+
"expected": null
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"description": "invalid with right number of digits but letters mixed in",
|
69
|
+
"property": "clean",
|
70
|
+
"phrase": "1a2b3c4d5e6f7g8h9i0j",
|
71
|
+
"expected": null
|
72
|
+
}
|
73
|
+
]
|
74
|
+
}
|
75
|
+
]
|
57
76
|
}
|