trackler 2.2.1.91 → 2.2.1.92
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/diamond/metadata.yml +1 -1
- data/problem-specifications/exercises/food-chain/canonical-data.json +42 -22
- data/problem-specifications/exercises/hello-world/canonical-data.json +2 -1
- data/problem-specifications/exercises/isbn-verifier/metadata.yml +2 -1
- data/problem-specifications/exercises/largest-series-product/canonical-data.json +62 -33
- data/problem-specifications/exercises/leap/canonical-data.json +14 -6
- data/problem-specifications/exercises/list-ops/canonical-data.json +6 -6
- data/problem-specifications/exercises/markdown/canonical-data.json +29 -11
- data/problem-specifications/exercises/minesweeper/canonical-data.json +80 -56
- data/problem-specifications/exercises/minesweeper/metadata.yml +1 -1
- data/problem-specifications/exercises/nth-prime/canonical-data.json +20 -8
- data/problem-specifications/exercises/nucleotide-count/canonical-data.json +17 -7
- data/problem-specifications/exercises/pascals-triangle/canonical-data.json +28 -10
- data/problem-specifications/exercises/perfect-numbers/canonical-data.json +41 -15
- data/problem-specifications/exercises/phone-number/canonical-data.json +44 -16
- data/problem-specifications/exercises/pig-latin/canonical-data.json +68 -24
- data/problem-specifications/exercises/reverse-string/metadata.yml +1 -1
- data/problem-specifications/exercises/rna-transcription/canonical-data.json +17 -7
- data/problem-specifications/exercises/roman-numerals/canonical-data.json +56 -20
- data/problem-specifications/exercises/rotational-cipher/canonical-data.json +42 -22
- data/problem-specifications/exercises/saddle-points/canonical-data.json +34 -24
- data/problem-specifications/exercises/scrabble-score/canonical-data.json +35 -13
- data/problem-specifications/exercises/secret-handshake/canonical-data.json +34 -12
- data/problem-specifications/exercises/sieve/canonical-data.json +16 -6
- data/problem-specifications/exercises/space-age/canonical-data.json +34 -18
- data/problem-specifications/exercises/spiral-matrix/canonical-data.json +19 -7
- data/problem-specifications/exercises/sublist/canonical-data.json +69 -35
- data/problem-specifications/exercises/twelve-days/canonical-data.json +61 -31
- data/problem-specifications/exercises/variable-length-quantity/canonical-data.json +79 -27
- data/problem-specifications/exercises/zebra-puzzle/canonical-data.json +3 -1
- data/tracks/csharp/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/allergies/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/alphametics/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/bank-account/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/beer-song/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/clock/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/custom-set/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/diamond/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/difference-of-squares/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/diffie-hellman/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/dot-dsl/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/food-chain/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/forth/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/hangman/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/house/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/list-ops/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/markdown/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/nth-prime/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/nucleotide-count/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/palindrome-products/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/proverb/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/react/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/roman-numerals/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/saddle-points/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/sgf-parsing/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/simple-linked-list/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/sublist/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/sum-of-multiples/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/twelve-days/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/variable-length-quantity/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/word-search/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/wordy/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/zebra-puzzle/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/csharp/exercises/zipper/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/delphi/exercises/secret-handshake/uTestSecretHandshake.pas +1 -1
- data/tracks/elixir/config/exercise_readme.go.tmpl +34 -4
- data/tracks/elixir/exercises/accumulate/README.md +1 -6
- data/tracks/elixir/exercises/acronym/README.md +1 -4
- data/tracks/elixir/exercises/all-your-base/README.md +2 -5
- data/tracks/elixir/exercises/allergies/README.md +1 -4
- data/tracks/elixir/exercises/anagram/README.md +1 -3
- data/tracks/elixir/exercises/atbash-cipher/README.md +3 -4
- data/tracks/elixir/exercises/bank-account/README.md +1 -4
- data/tracks/elixir/exercises/beer-song/README.md +3 -5
- data/tracks/elixir/exercises/binary-search-tree/README.md +43 -0
- data/tracks/elixir/exercises/binary-search/README.md +1 -3
- data/tracks/elixir/exercises/binary/README.md +3 -3
- data/tracks/elixir/exercises/bob/README.md +2 -2
- data/tracks/elixir/exercises/bowling/README.md +21 -9
- data/tracks/elixir/exercises/bracket-push/README.md +1 -3
- data/tracks/elixir/exercises/change/README.md +2 -4
- data/tracks/elixir/exercises/clock/README.md +1 -3
- data/tracks/elixir/exercises/collatz-conjecture/README.md +2 -4
- data/tracks/elixir/exercises/connect/README.md +2 -5
- data/tracks/elixir/exercises/crypto-square/README.md +11 -11
- data/tracks/elixir/exercises/custom-set/README.md +1 -4
- data/tracks/elixir/exercises/diamond/README.md +7 -9
- data/tracks/elixir/exercises/difference-of-squares/README.md +1 -3
- data/tracks/elixir/exercises/diffie-hellman/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/elixir/exercises/diffie-hellman/README.md +1 -3
- data/tracks/elixir/exercises/dominoes/README.md +4 -7
- data/tracks/elixir/exercises/dot-dsl/README.md +2 -5
- data/tracks/elixir/exercises/etl/README.md +4 -4
- data/tracks/elixir/exercises/flatten-array/README.md +2 -5
- data/tracks/elixir/exercises/forth/README.md +1 -4
- data/tracks/elixir/exercises/gigasecond/README.md +1 -3
- data/tracks/elixir/exercises/grade-school/README.md +1 -4
- data/tracks/elixir/exercises/grains/README.md +1 -4
- data/tracks/elixir/exercises/grep/README.md +13 -15
- data/tracks/elixir/exercises/hamming/README.md +1 -3
- data/tracks/elixir/exercises/hello-world/README.md +23 -0
- data/tracks/elixir/exercises/hexadecimal/README.md +1 -3
- data/tracks/elixir/exercises/isbn-verifier/README.md +26 -24
- data/tracks/elixir/exercises/isogram/README.md +3 -4
- data/tracks/elixir/exercises/kindergarten-garden/README.md +14 -16
- data/tracks/elixir/exercises/largest-series-product/README.md +1 -3
- data/tracks/elixir/exercises/leap/README.md +2 -4
- data/tracks/elixir/exercises/list-ops/README.md +1 -4
- data/tracks/elixir/exercises/luhn/README.md +8 -10
- data/tracks/elixir/exercises/markdown/README.md +1 -4
- data/tracks/elixir/exercises/matrix/README.md +7 -7
- data/tracks/elixir/exercises/meetup/README.md +17 -16
- data/tracks/elixir/exercises/minesweeper/README.md +1 -4
- data/tracks/elixir/exercises/nth-prime/README.md +1 -3
- data/tracks/elixir/exercises/nucleotide-count/README.md +9 -25
- data/tracks/elixir/exercises/ocr-numbers/README.md +7 -9
- data/tracks/elixir/exercises/palindrome-products/README.md +16 -19
- data/tracks/elixir/exercises/pangram/README.md +2 -4
- data/tracks/elixir/exercises/parallel-letter-frequency/README.md +1 -4
- data/tracks/elixir/exercises/pascals-triangle/README.md +3 -5
- data/tracks/elixir/exercises/perfect-numbers/README.md +3 -5
- data/tracks/elixir/exercises/phone-number/README.md +5 -6
- data/tracks/elixir/exercises/pig-latin/README.md +1 -3
- data/tracks/elixir/exercises/poker/README.md +1 -3
- data/tracks/elixir/exercises/prime-factors/README.md +1 -3
- data/tracks/elixir/exercises/protein-translation/README.md +3 -6
- data/tracks/elixir/exercises/pythagorean-triplet/README.md +4 -6
- data/tracks/elixir/exercises/queen-attack/README.md +2 -4
- data/tracks/elixir/exercises/rail-fence-cipher/README.md +13 -10
- data/tracks/elixir/exercises/raindrops/README.md +1 -3
- data/tracks/elixir/exercises/rna-transcription/README.md +2 -4
- data/tracks/elixir/exercises/robot-simulator/README.md +1 -3
- data/tracks/elixir/exercises/roman-numerals/README.md +2 -4
- data/tracks/elixir/exercises/rotational-cipher/README.md +3 -4
- data/tracks/elixir/exercises/run-length-encoding/README.md +5 -7
- data/tracks/elixir/exercises/saddle-points/README.md +3 -5
- data/tracks/elixir/exercises/say/README.md +1 -3
- data/tracks/elixir/exercises/scale-generator/README.md +1 -5
- data/tracks/elixir/exercises/scrabble-score/README.md +4 -4
- data/tracks/elixir/exercises/secret-handshake/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/elixir/exercises/secret-handshake/README.md +4 -4
- data/tracks/elixir/exercises/series/README.md +1 -3
- data/tracks/elixir/exercises/sieve/README.md +1 -3
- data/tracks/elixir/exercises/simple-cipher/README.md +6 -10
- data/tracks/elixir/exercises/simple-linked-list/README.md +1 -3
- data/tracks/elixir/exercises/space-age/README.md +2 -4
- data/tracks/elixir/exercises/spiral-matrix/README.md +5 -5
- data/tracks/elixir/exercises/strain/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/elixir/exercises/strain/README.md +1 -3
- data/tracks/elixir/exercises/sublist/README.md +1 -4
- data/tracks/elixir/exercises/sum-of-multiples/README.md +4 -9
- data/tracks/elixir/exercises/tournament/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/elixir/exercises/tournament/README.md +6 -9
- data/tracks/elixir/exercises/transpose/README.md +6 -7
- data/tracks/elixir/exercises/triangle/README.md +10 -9
- data/tracks/elixir/exercises/twelve-days/README.md +2 -4
- data/tracks/elixir/exercises/word-count/README.md +2 -5
- data/tracks/elixir/exercises/wordy/README.md +1 -8
- data/tracks/elixir/exercises/zipper/README.md +2 -5
- data/tracks/fortran/README.md +1 -1
- data/tracks/fsharp/config/exercise_readme.go.tmpl +0 -3
- data/tracks/fsharp/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/alphametics/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/beer-song/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/diamond/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/difference-of-squares/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/diffie-hellman/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/food-chain/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/gigasecond/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/grade-school/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/grains/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/house/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/lens-person/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/linked-list/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/nth-prime/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/palindrome-products/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/poker/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/proverb/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/raindrops/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/rna-transcription/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/space-age/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/twelve-days/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/fsharp/exercises/wordy/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/java/exercises/acronym/.meta/version +1 -1
- data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +6 -6
- data/tracks/java/exercises/raindrops/.meta/version +1 -0
- data/tracks/java/exercises/raindrops/src/test/java/RaindropConverterTest.java +3 -1
- data/tracks/java/exercises/transpose/src/test/java/TransposeTest.java +5 -5
- data/tracks/java/exercises/word-count/.meta/src/reference/java/WordCount.java +1 -1
- data/tracks/java/exercises/word-count/.meta/version +1 -0
- data/tracks/java/exercises/word-count/src/test/java/WordCountTest.java +73 -3
- data/tracks/mips/config/exercise_readme.go.tmpl +0 -3
- data/tracks/perl5/config/exercise_readme.go.tmpl +0 -3
- data/tracks/php/exercises/bob/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/php/exercises/roman-numerals/roman-numerals_test.php +1 -1
- data/tracks/pony/config/exercise_readme.go.tmpl +0 -3
- data/tracks/python/config.json +14 -0
- data/tracks/python/exercises/isbn-verifier/README.md +43 -0
- data/tracks/python/exercises/isbn-verifier/example.py +8 -0
- data/tracks/python/exercises/isbn-verifier/isbn_verifier.py +2 -0
- data/tracks/python/exercises/isbn-verifier/isbn_verifier_test.py +54 -0
- data/tracks/rust/exercises/atbash-cipher/example.rs +0 -2
- data/tracks/rust/exercises/bracket-push/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/rust/exercises/crypto-square/example.rs +0 -2
- data/tracks/rust/exercises/etl/example.rs +0 -1
- data/tracks/rust/exercises/forth/example.rs +0 -1
- data/tracks/rust/exercises/largest-series-product/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/rust/exercises/pangram/example.rs +0 -1
- data/tracks/rust/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs +9 -2
- data/tracks/rust/exercises/space-age/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/rust/exercises/triangle/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/bank-account/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/connect/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/gigasecond/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/hamming/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/leap/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/nucleotide-count/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/phone-number/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/robot-name/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/roman-numerals/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/scala/exercises/variable-length-quantity/{HINTS.md → .meta/hints.md} +0 -0
- metadata +87 -86
- data/tracks/elixir/docs/EXERCISE_README_INSERT.md +0 -35
- data/tracks/fsharp/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/mips/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/perl5/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/pony/docs/EXERCISE_README_INSERT.md +0 -0
@@ -8,11 +8,9 @@ verify that all the pairs are matched and nested correctly.
|
|
8
8
|
Execute the tests with:
|
9
9
|
|
10
10
|
```bash
|
11
|
-
$ elixir
|
11
|
+
$ elixir bracket_push_test.exs
|
12
12
|
```
|
13
13
|
|
14
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
15
|
-
|
16
14
|
### Pending tests
|
17
15
|
|
18
16
|
In the test suites, all but the first test have been skipped.
|
@@ -21,11 +21,9 @@ that the sum of the coins' value would equal the correct amount of change.
|
|
21
21
|
Execute the tests with:
|
22
22
|
|
23
23
|
```bash
|
24
|
-
$ elixir
|
24
|
+
$ elixir change_test.exs
|
25
25
|
```
|
26
26
|
|
27
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
28
|
-
|
29
27
|
### Pending tests
|
30
28
|
|
31
29
|
In the test suites, all but the first test have been skipped.
|
@@ -54,7 +52,7 @@ see the [help page](http://exercism.io/languages/elixir).
|
|
54
52
|
|
55
53
|
## Source
|
56
54
|
|
57
|
-
Software Craftsmanship - Kata
|
55
|
+
Software Craftsmanship - Coin Change Kata [https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata](https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata)
|
58
56
|
|
59
57
|
## Submitting Incomplete Solutions
|
60
58
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -11,11 +11,9 @@ Two clocks that represent the same time should be equal to each other.
|
|
11
11
|
Execute the tests with:
|
12
12
|
|
13
13
|
```bash
|
14
|
-
$ elixir
|
14
|
+
$ elixir clock_test.exs
|
15
15
|
```
|
16
16
|
|
17
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
18
|
-
|
19
17
|
### Pending tests
|
20
18
|
|
21
19
|
In the test suites, all but the first test have been skipped.
|
@@ -10,6 +10,7 @@ always reach 1 eventually.
|
|
10
10
|
Given a number n, return the number of steps required to reach 1.
|
11
11
|
|
12
12
|
## Examples
|
13
|
+
|
13
14
|
Starting with n = 12, the steps would be as follows:
|
14
15
|
|
15
16
|
0. 12
|
@@ -25,17 +26,14 @@ Starting with n = 12, the steps would be as follows:
|
|
25
26
|
|
26
27
|
Resulting in 9 steps. So for input n = 12, the return value would be 9.
|
27
28
|
|
28
|
-
|
29
29
|
## Running tests
|
30
30
|
|
31
31
|
Execute the tests with:
|
32
32
|
|
33
33
|
```bash
|
34
|
-
$ elixir
|
34
|
+
$ elixir collatz_conjecture_test.exs
|
35
35
|
```
|
36
36
|
|
37
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
38
|
-
|
39
37
|
### Pending tests
|
40
38
|
|
41
39
|
In the test suites, all but the first test have been skipped.
|
@@ -18,7 +18,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair".
|
|
18
18
|
The boards look like this (with spaces added for readability, which won't be in
|
19
19
|
the representation passed to your code):
|
20
20
|
|
21
|
-
```
|
21
|
+
```text
|
22
22
|
. O . X .
|
23
23
|
. X X O .
|
24
24
|
O O O X .
|
@@ -35,11 +35,9 @@ won since `O` didn't connect top and bottom.
|
|
35
35
|
Execute the tests with:
|
36
36
|
|
37
37
|
```bash
|
38
|
-
$ elixir
|
38
|
+
$ elixir connect_test.exs
|
39
39
|
```
|
40
40
|
|
41
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
42
|
-
|
43
41
|
### Pending tests
|
44
42
|
|
45
43
|
In the test suites, all but the first test have been skipped.
|
@@ -66,6 +64,5 @@ Or, you can enable all the tests by commenting out the
|
|
66
64
|
For more detailed information about the Elixir track, please
|
67
65
|
see the [help page](http://exercism.io/languages/elixir).
|
68
66
|
|
69
|
-
|
70
67
|
## Submitting Incomplete Solutions
|
71
68
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -26,7 +26,7 @@ and `r` is the number of rows.
|
|
26
26
|
Our normalized text is 54 characters long, dictating a rectangle with
|
27
27
|
`c = 8` and `r = 7`:
|
28
28
|
|
29
|
-
```
|
29
|
+
```text
|
30
30
|
ifmanwas
|
31
31
|
meanttos
|
32
32
|
tayonthe
|
@@ -41,22 +41,24 @@ right.
|
|
41
41
|
|
42
42
|
The message above is coded as:
|
43
43
|
|
44
|
-
```
|
44
|
+
```text
|
45
45
|
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
|
46
46
|
```
|
47
47
|
|
48
|
-
Output the encoded text in chunks. Phrases that fill perfect
|
49
|
-
`(r X
|
50
|
-
|
48
|
+
Output the encoded text in chunks. Phrases that fill perfect rectangles
|
49
|
+
`(r X c)` should be output `c` chunks of `r` length, separated by spaces.
|
50
|
+
Phrases that do not fill perfect rectangles will have `n` empty spaces.
|
51
|
+
Those spaces should be distributed evenly, added to the end of the last
|
52
|
+
`n` chunks.
|
51
53
|
|
52
|
-
```
|
53
|
-
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn
|
54
|
+
```text
|
55
|
+
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
|
54
56
|
```
|
55
57
|
|
56
58
|
Notice that were we to stack these, we could visually decode the
|
57
59
|
cyphertext back in to the original message:
|
58
60
|
|
59
|
-
```
|
61
|
+
```text
|
60
62
|
imtgdvs
|
61
63
|
fearwer
|
62
64
|
mayoogo
|
@@ -72,11 +74,9 @@ sseoau
|
|
72
74
|
Execute the tests with:
|
73
75
|
|
74
76
|
```bash
|
75
|
-
$ elixir
|
77
|
+
$ elixir crypto_square_test.exs
|
76
78
|
```
|
77
79
|
|
78
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
79
|
-
|
80
80
|
### Pending tests
|
81
81
|
|
82
82
|
In the test suites, all but the first test have been skipped.
|
@@ -12,11 +12,9 @@ unique elements.
|
|
12
12
|
Execute the tests with:
|
13
13
|
|
14
14
|
```bash
|
15
|
-
$ elixir
|
15
|
+
$ elixir custom_set_test.exs
|
16
16
|
```
|
17
17
|
|
18
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
19
|
-
|
20
18
|
### Pending tests
|
21
19
|
|
22
20
|
In the test suites, all but the first test have been skipped.
|
@@ -43,6 +41,5 @@ Or, you can enable all the tests by commenting out the
|
|
43
41
|
For more detailed information about the Elixir track, please
|
44
42
|
see the [help page](http://exercism.io/languages/elixir).
|
45
43
|
|
46
|
-
|
47
44
|
## Submitting Incomplete Solutions
|
48
45
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Diamond
|
2
2
|
|
3
|
-
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
-
shape. Given a letter, it prints a diamond starting with 'A', with the
|
3
|
+
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
+
shape. Given a letter, it prints a diamond starting with 'A', with the
|
5
5
|
supplied letter at the widest point.
|
6
6
|
|
7
7
|
## Requirements
|
@@ -15,7 +15,7 @@ supplied letter at the widest point.
|
|
15
15
|
* The diamond has a square shape (width equals height).
|
16
16
|
* The letters form a diamond shape.
|
17
17
|
* The top half has the letters in ascending order.
|
18
|
-
* The bottom half has the letters in descending order.
|
18
|
+
* The bottom half has the letters in descending order.
|
19
19
|
* The four corners (containing the spaces) are triangles.
|
20
20
|
|
21
21
|
## Examples
|
@@ -24,13 +24,13 @@ In the following examples, spaces are indicated by `·` characters.
|
|
24
24
|
|
25
25
|
Diamond for letter 'A':
|
26
26
|
|
27
|
-
```
|
27
|
+
```text
|
28
28
|
A
|
29
29
|
```
|
30
30
|
|
31
31
|
Diamond for letter 'C':
|
32
32
|
|
33
|
-
```
|
33
|
+
```text
|
34
34
|
··A··
|
35
35
|
·B·B·
|
36
36
|
C···C
|
@@ -40,7 +40,7 @@ C···C
|
|
40
40
|
|
41
41
|
Diamond for letter 'E':
|
42
42
|
|
43
|
-
```
|
43
|
+
```text
|
44
44
|
····A····
|
45
45
|
···B·B···
|
46
46
|
··C···C··
|
@@ -57,11 +57,9 @@ E·······E
|
|
57
57
|
Execute the tests with:
|
58
58
|
|
59
59
|
```bash
|
60
|
-
$ elixir
|
60
|
+
$ elixir diamond_test.exs
|
61
61
|
```
|
62
62
|
|
63
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
64
|
-
|
65
63
|
### Pending tests
|
66
64
|
|
67
65
|
In the test suites, all but the first test have been skipped.
|
@@ -17,11 +17,9 @@ natural numbers is 3025 - 385 = 2640.
|
|
17
17
|
Execute the tests with:
|
18
18
|
|
19
19
|
```bash
|
20
|
-
$ elixir
|
20
|
+
$ elixir difference_of_squares_test.exs
|
21
21
|
```
|
22
22
|
|
23
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
24
|
-
|
25
23
|
### Pending tests
|
26
24
|
|
27
25
|
In the test suites, all but the first test have been skipped.
|
File without changes
|
@@ -54,11 +54,9 @@ particularly for enormous integers, but you might need :binary to decode it.
|
|
54
54
|
Execute the tests with:
|
55
55
|
|
56
56
|
```bash
|
57
|
-
$ elixir
|
57
|
+
$ elixir diffie_hellman_test.exs
|
58
58
|
```
|
59
59
|
|
60
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
61
|
-
|
62
60
|
### Pending tests
|
63
61
|
|
64
62
|
In the test suites, all but the first test have been skipped.
|
@@ -7,10 +7,10 @@ correct domino chain (the dots on one half of a stone match the dots on the
|
|
7
7
|
neighbouring half of an adjacent stone) and that dots on the halfs of the stones
|
8
8
|
which don't have a neighbour (the first and last stone) match each other.
|
9
9
|
|
10
|
-
For example given the stones `
|
11
|
-
like `
|
10
|
+
For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something
|
11
|
+
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.
|
12
12
|
|
13
|
-
For stones
|
13
|
+
For stones `[1|2]`, `[4|1]` and `[2|3]` the resulting chain is not valid: `[4|1] [1|2] [2|3]`'s first and last numbers are not the same. 4 != 3
|
14
14
|
|
15
15
|
Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used.
|
16
16
|
|
@@ -19,11 +19,9 @@ Some test cases may use duplicate stones in a chain solution, assume that multip
|
|
19
19
|
Execute the tests with:
|
20
20
|
|
21
21
|
```bash
|
22
|
-
$ elixir
|
22
|
+
$ elixir dominoes_test.exs
|
23
23
|
```
|
24
24
|
|
25
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
26
|
-
|
27
25
|
### Pending tests
|
28
26
|
|
29
27
|
In the test suites, all but the first test have been skipped.
|
@@ -50,6 +48,5 @@ Or, you can enable all the tests by commenting out the
|
|
50
48
|
For more detailed information about the Elixir track, please
|
51
49
|
see the [help page](http://exercism.io/languages/elixir).
|
52
50
|
|
53
|
-
|
54
51
|
## Submitting Incomplete Solutions
|
55
52
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# DOT DSL
|
2
2
|
|
3
3
|
Write a Domain Specific Language similar to the Graphviz dot language.
|
4
4
|
|
@@ -29,11 +29,9 @@ Create a DSL similar to the dot language.
|
|
29
29
|
Execute the tests with:
|
30
30
|
|
31
31
|
```bash
|
32
|
-
$ elixir
|
32
|
+
$ elixir dot_dsl_test.exs
|
33
33
|
```
|
34
34
|
|
35
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
36
|
-
|
37
35
|
### Pending tests
|
38
36
|
|
39
37
|
In the test suites, all but the first test have been skipped.
|
@@ -60,6 +58,5 @@ Or, you can enable all the tests by commenting out the
|
|
60
58
|
For more detailed information about the Elixir track, please
|
61
59
|
see the [help page](http://exercism.io/languages/elixir).
|
62
60
|
|
63
|
-
|
64
61
|
## Submitting Incomplete Solutions
|
65
62
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# ETL
|
2
2
|
|
3
3
|
We are going to do the `Transform` step of an Extract-Transform-Load.
|
4
4
|
|
5
5
|
### ETL
|
6
|
+
|
6
7
|
Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
|
7
8
|
we're going to migrate this."
|
8
9
|
|
@@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and
|
|
11
12
|
moaning about how stupid we could possibly be.)
|
12
13
|
|
13
14
|
### The goal
|
15
|
+
|
14
16
|
We're going to extract some scrabble scores from a legacy system.
|
15
17
|
|
16
18
|
The old system stored a list of letters per score:
|
@@ -49,11 +51,9 @@ game while being scored at 4 in the Hawaiian-language version.
|
|
49
51
|
Execute the tests with:
|
50
52
|
|
51
53
|
```bash
|
52
|
-
$ elixir
|
54
|
+
$ elixir etl_test.exs
|
53
55
|
```
|
54
56
|
|
55
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
56
|
-
|
57
57
|
### Pending tests
|
58
58
|
|
59
59
|
In the test suites, all but the first test have been skipped.
|
@@ -3,24 +3,21 @@
|
|
3
3
|
Take a nested list and return a single flattened list with all values except nil/null.
|
4
4
|
|
5
5
|
The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
|
6
|
-
|
6
|
+
|
7
7
|
For Example
|
8
8
|
|
9
9
|
input: [1,[2,3,null,4],[null],5]
|
10
10
|
|
11
11
|
output: [1,2,3,4,5]
|
12
12
|
|
13
|
-
|
14
13
|
## Running tests
|
15
14
|
|
16
15
|
Execute the tests with:
|
17
16
|
|
18
17
|
```bash
|
19
|
-
$ elixir
|
18
|
+
$ elixir flatten_array_test.exs
|
20
19
|
```
|
21
20
|
|
22
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
23
|
-
|
24
21
|
### Pending tests
|
25
22
|
|
26
23
|
In the test suites, all but the first test have been skipped.
|
@@ -30,11 +30,9 @@ Words are case-insensitive.
|
|
30
30
|
Execute the tests with:
|
31
31
|
|
32
32
|
```bash
|
33
|
-
$ elixir
|
33
|
+
$ elixir forth_test.exs
|
34
34
|
```
|
35
35
|
|
36
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
37
|
-
|
38
36
|
### Pending tests
|
39
37
|
|
40
38
|
In the test suites, all but the first test have been skipped.
|
@@ -61,6 +59,5 @@ Or, you can enable all the tests by commenting out the
|
|
61
59
|
For more detailed information about the Elixir track, please
|
62
60
|
see the [help page](http://exercism.io/languages/elixir).
|
63
61
|
|
64
|
-
|
65
62
|
## Submitting Incomplete Solutions
|
66
63
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -9,11 +9,9 @@ A gigasecond is 10^9 (1,000,000,000) seconds.
|
|
9
9
|
Execute the tests with:
|
10
10
|
|
11
11
|
```bash
|
12
|
-
$ elixir
|
12
|
+
$ elixir gigasecond_test.exs
|
13
13
|
```
|
14
14
|
|
15
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
16
|
-
|
17
15
|
### Pending tests
|
18
16
|
|
19
17
|
In the test suites, all but the first test have been skipped.
|
@@ -21,7 +21,6 @@ In the end, you should be able to:
|
|
21
21
|
Note that all our students only have one name. (It's a small town, what
|
22
22
|
do you want?)
|
23
23
|
|
24
|
-
|
25
24
|
## For bonus points
|
26
25
|
|
27
26
|
Did you get the tests passing and the code clean? If you want to, these
|
@@ -40,11 +39,9 @@ experiment make the code better? Worse? Did you learn anything from it?
|
|
40
39
|
Execute the tests with:
|
41
40
|
|
42
41
|
```bash
|
43
|
-
$ elixir
|
42
|
+
$ elixir grade_school_test.exs
|
44
43
|
```
|
45
44
|
|
46
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
47
|
-
|
48
45
|
### Pending tests
|
49
46
|
|
50
47
|
In the test suites, all but the first test have been skipped.
|
@@ -15,7 +15,6 @@ Write code that shows:
|
|
15
15
|
- how many grains were on each square, and
|
16
16
|
- the total number of grains
|
17
17
|
|
18
|
-
|
19
18
|
## For bonus points
|
20
19
|
|
21
20
|
Did you get the tests passing and the code clean? If you want to, these
|
@@ -32,11 +31,9 @@ experiment make the code better? Worse? Did you learn anything from it?
|
|
32
31
|
Execute the tests with:
|
33
32
|
|
34
33
|
```bash
|
35
|
-
$ elixir
|
34
|
+
$ elixir grains_test.exs
|
36
35
|
```
|
37
36
|
|
38
|
-
(Replace `bob_test.exs` with the name of the test file.)
|
39
|
-
|
40
37
|
### Pending tests
|
41
38
|
|
42
39
|
In the test suites, all but the first test have been skipped.
|