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.
Files changed (233) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/diamond/metadata.yml +1 -1
  4. data/problem-specifications/exercises/food-chain/canonical-data.json +42 -22
  5. data/problem-specifications/exercises/hello-world/canonical-data.json +2 -1
  6. data/problem-specifications/exercises/isbn-verifier/metadata.yml +2 -1
  7. data/problem-specifications/exercises/largest-series-product/canonical-data.json +62 -33
  8. data/problem-specifications/exercises/leap/canonical-data.json +14 -6
  9. data/problem-specifications/exercises/list-ops/canonical-data.json +6 -6
  10. data/problem-specifications/exercises/markdown/canonical-data.json +29 -11
  11. data/problem-specifications/exercises/minesweeper/canonical-data.json +80 -56
  12. data/problem-specifications/exercises/minesweeper/metadata.yml +1 -1
  13. data/problem-specifications/exercises/nth-prime/canonical-data.json +20 -8
  14. data/problem-specifications/exercises/nucleotide-count/canonical-data.json +17 -7
  15. data/problem-specifications/exercises/pascals-triangle/canonical-data.json +28 -10
  16. data/problem-specifications/exercises/perfect-numbers/canonical-data.json +41 -15
  17. data/problem-specifications/exercises/phone-number/canonical-data.json +44 -16
  18. data/problem-specifications/exercises/pig-latin/canonical-data.json +68 -24
  19. data/problem-specifications/exercises/reverse-string/metadata.yml +1 -1
  20. data/problem-specifications/exercises/rna-transcription/canonical-data.json +17 -7
  21. data/problem-specifications/exercises/roman-numerals/canonical-data.json +56 -20
  22. data/problem-specifications/exercises/rotational-cipher/canonical-data.json +42 -22
  23. data/problem-specifications/exercises/saddle-points/canonical-data.json +34 -24
  24. data/problem-specifications/exercises/scrabble-score/canonical-data.json +35 -13
  25. data/problem-specifications/exercises/secret-handshake/canonical-data.json +34 -12
  26. data/problem-specifications/exercises/sieve/canonical-data.json +16 -6
  27. data/problem-specifications/exercises/space-age/canonical-data.json +34 -18
  28. data/problem-specifications/exercises/spiral-matrix/canonical-data.json +19 -7
  29. data/problem-specifications/exercises/sublist/canonical-data.json +69 -35
  30. data/problem-specifications/exercises/twelve-days/canonical-data.json +61 -31
  31. data/problem-specifications/exercises/variable-length-quantity/canonical-data.json +79 -27
  32. data/problem-specifications/exercises/zebra-puzzle/canonical-data.json +3 -1
  33. data/tracks/csharp/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
  34. data/tracks/csharp/exercises/allergies/{HINTS.md → .meta/hints.md} +0 -0
  35. data/tracks/csharp/exercises/alphametics/{HINTS.md → .meta/hints.md} +0 -0
  36. data/tracks/csharp/exercises/bank-account/{HINTS.md → .meta/hints.md} +0 -0
  37. data/tracks/csharp/exercises/beer-song/{HINTS.md → .meta/hints.md} +0 -0
  38. data/tracks/csharp/exercises/clock/{HINTS.md → .meta/hints.md} +0 -0
  39. data/tracks/csharp/exercises/custom-set/{HINTS.md → .meta/hints.md} +0 -0
  40. data/tracks/csharp/exercises/diamond/{HINTS.md → .meta/hints.md} +0 -0
  41. data/tracks/csharp/exercises/difference-of-squares/{HINTS.md → .meta/hints.md} +0 -0
  42. data/tracks/csharp/exercises/diffie-hellman/{HINTS.md → .meta/hints.md} +0 -0
  43. data/tracks/csharp/exercises/dot-dsl/{HINTS.md → .meta/hints.md} +0 -0
  44. data/tracks/csharp/exercises/food-chain/{HINTS.md → .meta/hints.md} +0 -0
  45. data/tracks/csharp/exercises/forth/{HINTS.md → .meta/hints.md} +0 -0
  46. data/tracks/csharp/exercises/hangman/{HINTS.md → .meta/hints.md} +0 -0
  47. data/tracks/csharp/exercises/house/{HINTS.md → .meta/hints.md} +0 -0
  48. data/tracks/csharp/exercises/list-ops/{HINTS.md → .meta/hints.md} +0 -0
  49. data/tracks/csharp/exercises/markdown/{HINTS.md → .meta/hints.md} +0 -0
  50. data/tracks/csharp/exercises/nth-prime/{HINTS.md → .meta/hints.md} +0 -0
  51. data/tracks/csharp/exercises/nucleotide-count/{HINTS.md → .meta/hints.md} +0 -0
  52. data/tracks/csharp/exercises/palindrome-products/{HINTS.md → .meta/hints.md} +0 -0
  53. data/tracks/csharp/exercises/proverb/{HINTS.md → .meta/hints.md} +0 -0
  54. data/tracks/csharp/exercises/react/{HINTS.md → .meta/hints.md} +0 -0
  55. data/tracks/csharp/exercises/roman-numerals/{HINTS.md → .meta/hints.md} +0 -0
  56. data/tracks/csharp/exercises/saddle-points/{HINTS.md → .meta/hints.md} +0 -0
  57. data/tracks/csharp/exercises/sgf-parsing/{HINTS.md → .meta/hints.md} +0 -0
  58. data/tracks/csharp/exercises/simple-linked-list/{HINTS.md → .meta/hints.md} +0 -0
  59. data/tracks/csharp/exercises/sublist/{HINTS.md → .meta/hints.md} +0 -0
  60. data/tracks/csharp/exercises/sum-of-multiples/{HINTS.md → .meta/hints.md} +0 -0
  61. data/tracks/csharp/exercises/twelve-days/{HINTS.md → .meta/hints.md} +0 -0
  62. data/tracks/csharp/exercises/variable-length-quantity/{HINTS.md → .meta/hints.md} +0 -0
  63. data/tracks/csharp/exercises/word-search/{HINTS.md → .meta/hints.md} +0 -0
  64. data/tracks/csharp/exercises/wordy/{HINTS.md → .meta/hints.md} +0 -0
  65. data/tracks/csharp/exercises/zebra-puzzle/{HINTS.md → .meta/hints.md} +0 -0
  66. data/tracks/csharp/exercises/zipper/{HINTS.md → .meta/hints.md} +0 -0
  67. data/tracks/delphi/exercises/secret-handshake/uTestSecretHandshake.pas +1 -1
  68. data/tracks/elixir/config/exercise_readme.go.tmpl +34 -4
  69. data/tracks/elixir/exercises/accumulate/README.md +1 -6
  70. data/tracks/elixir/exercises/acronym/README.md +1 -4
  71. data/tracks/elixir/exercises/all-your-base/README.md +2 -5
  72. data/tracks/elixir/exercises/allergies/README.md +1 -4
  73. data/tracks/elixir/exercises/anagram/README.md +1 -3
  74. data/tracks/elixir/exercises/atbash-cipher/README.md +3 -4
  75. data/tracks/elixir/exercises/bank-account/README.md +1 -4
  76. data/tracks/elixir/exercises/beer-song/README.md +3 -5
  77. data/tracks/elixir/exercises/binary-search-tree/README.md +43 -0
  78. data/tracks/elixir/exercises/binary-search/README.md +1 -3
  79. data/tracks/elixir/exercises/binary/README.md +3 -3
  80. data/tracks/elixir/exercises/bob/README.md +2 -2
  81. data/tracks/elixir/exercises/bowling/README.md +21 -9
  82. data/tracks/elixir/exercises/bracket-push/README.md +1 -3
  83. data/tracks/elixir/exercises/change/README.md +2 -4
  84. data/tracks/elixir/exercises/clock/README.md +1 -3
  85. data/tracks/elixir/exercises/collatz-conjecture/README.md +2 -4
  86. data/tracks/elixir/exercises/connect/README.md +2 -5
  87. data/tracks/elixir/exercises/crypto-square/README.md +11 -11
  88. data/tracks/elixir/exercises/custom-set/README.md +1 -4
  89. data/tracks/elixir/exercises/diamond/README.md +7 -9
  90. data/tracks/elixir/exercises/difference-of-squares/README.md +1 -3
  91. data/tracks/elixir/exercises/diffie-hellman/{HINTS.md → .meta/hints.md} +0 -0
  92. data/tracks/elixir/exercises/diffie-hellman/README.md +1 -3
  93. data/tracks/elixir/exercises/dominoes/README.md +4 -7
  94. data/tracks/elixir/exercises/dot-dsl/README.md +2 -5
  95. data/tracks/elixir/exercises/etl/README.md +4 -4
  96. data/tracks/elixir/exercises/flatten-array/README.md +2 -5
  97. data/tracks/elixir/exercises/forth/README.md +1 -4
  98. data/tracks/elixir/exercises/gigasecond/README.md +1 -3
  99. data/tracks/elixir/exercises/grade-school/README.md +1 -4
  100. data/tracks/elixir/exercises/grains/README.md +1 -4
  101. data/tracks/elixir/exercises/grep/README.md +13 -15
  102. data/tracks/elixir/exercises/hamming/README.md +1 -3
  103. data/tracks/elixir/exercises/hello-world/README.md +23 -0
  104. data/tracks/elixir/exercises/hexadecimal/README.md +1 -3
  105. data/tracks/elixir/exercises/isbn-verifier/README.md +26 -24
  106. data/tracks/elixir/exercises/isogram/README.md +3 -4
  107. data/tracks/elixir/exercises/kindergarten-garden/README.md +14 -16
  108. data/tracks/elixir/exercises/largest-series-product/README.md +1 -3
  109. data/tracks/elixir/exercises/leap/README.md +2 -4
  110. data/tracks/elixir/exercises/list-ops/README.md +1 -4
  111. data/tracks/elixir/exercises/luhn/README.md +8 -10
  112. data/tracks/elixir/exercises/markdown/README.md +1 -4
  113. data/tracks/elixir/exercises/matrix/README.md +7 -7
  114. data/tracks/elixir/exercises/meetup/README.md +17 -16
  115. data/tracks/elixir/exercises/minesweeper/README.md +1 -4
  116. data/tracks/elixir/exercises/nth-prime/README.md +1 -3
  117. data/tracks/elixir/exercises/nucleotide-count/README.md +9 -25
  118. data/tracks/elixir/exercises/ocr-numbers/README.md +7 -9
  119. data/tracks/elixir/exercises/palindrome-products/README.md +16 -19
  120. data/tracks/elixir/exercises/pangram/README.md +2 -4
  121. data/tracks/elixir/exercises/parallel-letter-frequency/README.md +1 -4
  122. data/tracks/elixir/exercises/pascals-triangle/README.md +3 -5
  123. data/tracks/elixir/exercises/perfect-numbers/README.md +3 -5
  124. data/tracks/elixir/exercises/phone-number/README.md +5 -6
  125. data/tracks/elixir/exercises/pig-latin/README.md +1 -3
  126. data/tracks/elixir/exercises/poker/README.md +1 -3
  127. data/tracks/elixir/exercises/prime-factors/README.md +1 -3
  128. data/tracks/elixir/exercises/protein-translation/README.md +3 -6
  129. data/tracks/elixir/exercises/pythagorean-triplet/README.md +4 -6
  130. data/tracks/elixir/exercises/queen-attack/README.md +2 -4
  131. data/tracks/elixir/exercises/rail-fence-cipher/README.md +13 -10
  132. data/tracks/elixir/exercises/raindrops/README.md +1 -3
  133. data/tracks/elixir/exercises/rna-transcription/README.md +2 -4
  134. data/tracks/elixir/exercises/robot-simulator/README.md +1 -3
  135. data/tracks/elixir/exercises/roman-numerals/README.md +2 -4
  136. data/tracks/elixir/exercises/rotational-cipher/README.md +3 -4
  137. data/tracks/elixir/exercises/run-length-encoding/README.md +5 -7
  138. data/tracks/elixir/exercises/saddle-points/README.md +3 -5
  139. data/tracks/elixir/exercises/say/README.md +1 -3
  140. data/tracks/elixir/exercises/scale-generator/README.md +1 -5
  141. data/tracks/elixir/exercises/scrabble-score/README.md +4 -4
  142. data/tracks/elixir/exercises/secret-handshake/{HINTS.md → .meta/hints.md} +0 -0
  143. data/tracks/elixir/exercises/secret-handshake/README.md +4 -4
  144. data/tracks/elixir/exercises/series/README.md +1 -3
  145. data/tracks/elixir/exercises/sieve/README.md +1 -3
  146. data/tracks/elixir/exercises/simple-cipher/README.md +6 -10
  147. data/tracks/elixir/exercises/simple-linked-list/README.md +1 -3
  148. data/tracks/elixir/exercises/space-age/README.md +2 -4
  149. data/tracks/elixir/exercises/spiral-matrix/README.md +5 -5
  150. data/tracks/elixir/exercises/strain/{HINTS.md → .meta/hints.md} +0 -0
  151. data/tracks/elixir/exercises/strain/README.md +1 -3
  152. data/tracks/elixir/exercises/sublist/README.md +1 -4
  153. data/tracks/elixir/exercises/sum-of-multiples/README.md +4 -9
  154. data/tracks/elixir/exercises/tournament/{HINTS.md → .meta/hints.md} +0 -0
  155. data/tracks/elixir/exercises/tournament/README.md +6 -9
  156. data/tracks/elixir/exercises/transpose/README.md +6 -7
  157. data/tracks/elixir/exercises/triangle/README.md +10 -9
  158. data/tracks/elixir/exercises/twelve-days/README.md +2 -4
  159. data/tracks/elixir/exercises/word-count/README.md +2 -5
  160. data/tracks/elixir/exercises/wordy/README.md +1 -8
  161. data/tracks/elixir/exercises/zipper/README.md +2 -5
  162. data/tracks/fortran/README.md +1 -1
  163. data/tracks/fsharp/config/exercise_readme.go.tmpl +0 -3
  164. data/tracks/fsharp/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
  165. data/tracks/fsharp/exercises/alphametics/{HINTS.md → .meta/hints.md} +0 -0
  166. data/tracks/fsharp/exercises/beer-song/{HINTS.md → .meta/hints.md} +0 -0
  167. data/tracks/fsharp/exercises/diamond/{HINTS.md → .meta/hints.md} +0 -0
  168. data/tracks/fsharp/exercises/difference-of-squares/{HINTS.md → .meta/hints.md} +0 -0
  169. data/tracks/fsharp/exercises/diffie-hellman/{HINTS.md → .meta/hints.md} +0 -0
  170. data/tracks/fsharp/exercises/food-chain/{HINTS.md → .meta/hints.md} +0 -0
  171. data/tracks/fsharp/exercises/gigasecond/{HINTS.md → .meta/hints.md} +0 -0
  172. data/tracks/fsharp/exercises/grade-school/{HINTS.md → .meta/hints.md} +0 -0
  173. data/tracks/fsharp/exercises/grains/{HINTS.md → .meta/hints.md} +0 -0
  174. data/tracks/fsharp/exercises/house/{HINTS.md → .meta/hints.md} +0 -0
  175. data/tracks/fsharp/exercises/lens-person/{HINTS.md → .meta/hints.md} +0 -0
  176. data/tracks/fsharp/exercises/linked-list/{HINTS.md → .meta/hints.md} +0 -0
  177. data/tracks/fsharp/exercises/nth-prime/{HINTS.md → .meta/hints.md} +0 -0
  178. data/tracks/fsharp/exercises/palindrome-products/{HINTS.md → .meta/hints.md} +0 -0
  179. data/tracks/fsharp/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
  180. data/tracks/fsharp/exercises/poker/{HINTS.md → .meta/hints.md} +0 -0
  181. data/tracks/fsharp/exercises/proverb/{HINTS.md → .meta/hints.md} +0 -0
  182. data/tracks/fsharp/exercises/raindrops/{HINTS.md → .meta/hints.md} +0 -0
  183. data/tracks/fsharp/exercises/rna-transcription/{HINTS.md → .meta/hints.md} +0 -0
  184. data/tracks/fsharp/exercises/space-age/{HINTS.md → .meta/hints.md} +0 -0
  185. data/tracks/fsharp/exercises/twelve-days/{HINTS.md → .meta/hints.md} +0 -0
  186. data/tracks/fsharp/exercises/wordy/{HINTS.md → .meta/hints.md} +0 -0
  187. data/tracks/java/exercises/acronym/.meta/version +1 -1
  188. data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +6 -6
  189. data/tracks/java/exercises/raindrops/.meta/version +1 -0
  190. data/tracks/java/exercises/raindrops/src/test/java/RaindropConverterTest.java +3 -1
  191. data/tracks/java/exercises/transpose/src/test/java/TransposeTest.java +5 -5
  192. data/tracks/java/exercises/word-count/.meta/src/reference/java/WordCount.java +1 -1
  193. data/tracks/java/exercises/word-count/.meta/version +1 -0
  194. data/tracks/java/exercises/word-count/src/test/java/WordCountTest.java +73 -3
  195. data/tracks/mips/config/exercise_readme.go.tmpl +0 -3
  196. data/tracks/perl5/config/exercise_readme.go.tmpl +0 -3
  197. data/tracks/php/exercises/bob/{HINTS.md → .meta/hints.md} +0 -0
  198. data/tracks/php/exercises/roman-numerals/roman-numerals_test.php +1 -1
  199. data/tracks/pony/config/exercise_readme.go.tmpl +0 -3
  200. data/tracks/python/config.json +14 -0
  201. data/tracks/python/exercises/isbn-verifier/README.md +43 -0
  202. data/tracks/python/exercises/isbn-verifier/example.py +8 -0
  203. data/tracks/python/exercises/isbn-verifier/isbn_verifier.py +2 -0
  204. data/tracks/python/exercises/isbn-verifier/isbn_verifier_test.py +54 -0
  205. data/tracks/rust/exercises/atbash-cipher/example.rs +0 -2
  206. data/tracks/rust/exercises/bracket-push/{HINTS.md → .meta/hints.md} +0 -0
  207. data/tracks/rust/exercises/crypto-square/example.rs +0 -2
  208. data/tracks/rust/exercises/etl/example.rs +0 -1
  209. data/tracks/rust/exercises/forth/example.rs +0 -1
  210. data/tracks/rust/exercises/largest-series-product/{HINTS.md → .meta/hints.md} +0 -0
  211. data/tracks/rust/exercises/pangram/example.rs +0 -1
  212. data/tracks/rust/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
  213. data/tracks/rust/exercises/scrabble-score/tests/scrabble-score.rs +9 -2
  214. data/tracks/rust/exercises/space-age/{HINTS.md → .meta/hints.md} +0 -0
  215. data/tracks/rust/exercises/triangle/{HINTS.md → .meta/hints.md} +0 -0
  216. data/tracks/scala/exercises/bank-account/{HINTS.md → .meta/hints.md} +0 -0
  217. data/tracks/scala/exercises/connect/{HINTS.md → .meta/hints.md} +0 -0
  218. data/tracks/scala/exercises/gigasecond/{HINTS.md → .meta/hints.md} +0 -0
  219. data/tracks/scala/exercises/hamming/{HINTS.md → .meta/hints.md} +0 -0
  220. data/tracks/scala/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
  221. data/tracks/scala/exercises/leap/{HINTS.md → .meta/hints.md} +0 -0
  222. data/tracks/scala/exercises/nucleotide-count/{HINTS.md → .meta/hints.md} +0 -0
  223. data/tracks/scala/exercises/parallel-letter-frequency/{HINTS.md → .meta/hints.md} +0 -0
  224. data/tracks/scala/exercises/phone-number/{HINTS.md → .meta/hints.md} +0 -0
  225. data/tracks/scala/exercises/robot-name/{HINTS.md → .meta/hints.md} +0 -0
  226. data/tracks/scala/exercises/roman-numerals/{HINTS.md → .meta/hints.md} +0 -0
  227. data/tracks/scala/exercises/variable-length-quantity/{HINTS.md → .meta/hints.md} +0 -0
  228. metadata +87 -86
  229. data/tracks/elixir/docs/EXERCISE_README_INSERT.md +0 -35
  230. data/tracks/fsharp/docs/EXERCISE_README_INSERT.md +0 -0
  231. data/tracks/mips/docs/EXERCISE_README_INSERT.md +0 -0
  232. data/tracks/perl5/docs/EXERCISE_README_INSERT.md +0 -0
  233. data/tracks/pony/docs/EXERCISE_README_INSERT.md +0 -0
@@ -5,13 +5,15 @@ that matrix.
5
5
 
6
6
  So given a string with embedded newlines like:
7
7
 
8
- > 9 8 7
9
- > 5 3 2
10
- > 6 6 7
8
+ ```text
9
+ 9 8 7
10
+ 5 3 2
11
+ 6 6 7
12
+ ```
11
13
 
12
14
  representing this matrix:
13
15
 
14
- ```plain
16
+ ```text
15
17
  0 1 2
16
18
  |---------
17
19
  0 | 9 8 7
@@ -43,11 +45,9 @@ And its columns:
43
45
  Execute the tests with:
44
46
 
45
47
  ```bash
46
- $ elixir bob_test.exs
48
+ $ elixir matrix_test.exs
47
49
  ```
48
50
 
49
- (Replace `bob_test.exs` with the name of the test file.)
50
-
51
51
  ### Pending tests
52
52
 
53
53
  In the test suites, all but the first test have been skipped.
@@ -2,37 +2,38 @@
2
2
 
3
3
  Calculate the date of meetups.
4
4
 
5
- Typically meetups happen on the same day of the week. In this exercise, you will take
6
- a description of a meetup date, and return the actual meetup date.
5
+ Typically meetups happen on the same day of the week. In this exercise, you
6
+ will take a description of a meetup date, and return the actual meetup date.
7
7
 
8
8
  Examples of general descriptions are:
9
9
 
10
- - the first Monday of January 2017
11
- - the third Tuesday of January 2017
12
- - the Wednesteenth of January 2017
13
- - the last Thursday of January 2017
10
+ - The first Monday of January 2017
11
+ - The third Tuesday of January 2017
12
+ - The wednesteenth of January 2017
13
+ - The last Thursday of January 2017
14
14
 
15
- Note that "Monteenth", "Tuesteenth", etc are all made up words. There
16
- was a meetup whose members realized that there are exactly 7 numbered days in a month that
17
- end in '-teenth'. Therefore, one is guaranteed that each day of the week
15
+ The descriptors you are expected to parse are:
16
+ first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
17
+ thursteenth, friteenth, saturteenth, sunteenth
18
+
19
+ Note that "monteenth", "tuesteenth", etc are all made up words. There was a
20
+ meetup whose members realized that there are exactly 7 numbered days in a month
21
+ that end in '-teenth'. Therefore, one is guaranteed that each day of the week
18
22
  (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
19
23
  in every month.
20
24
 
21
- Given examples of a meetup dates, each containing a month, day, year, and descriptor
22
- (first, second, teenth, etc), calculate the date of the actual meetup.
23
- For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2
24
-
25
+ Given examples of a meetup dates, each containing a month, day, year, and
26
+ descriptor calculate the date of the actual meetup. For example, if given
27
+ "The first Monday of January 2017", the correct meetup date is 2017/1/2.
25
28
 
26
29
  ## Running tests
27
30
 
28
31
  Execute the tests with:
29
32
 
30
33
  ```bash
31
- $ elixir bob_test.exs
34
+ $ elixir meetup_test.exs
32
35
  ```
33
36
 
34
- (Replace `bob_test.exs` with the name of the test file.)
35
-
36
37
  ### Pending tests
37
38
 
38
39
  In the test suites, all but the first test have been skipped.
@@ -31,11 +31,9 @@ into this:
31
31
  Execute the tests with:
32
32
 
33
33
  ```bash
34
- $ elixir bob_test.exs
34
+ $ elixir minesweeper_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.
@@ -62,6 +60,5 @@ Or, you can enable all the tests by commenting out the
62
60
  For more detailed information about the Elixir track, please
63
61
  see the [help page](http://exercism.io/languages/elixir).
64
62
 
65
-
66
63
  ## Submitting Incomplete Solutions
67
64
  It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -13,11 +13,9 @@ numbers, pretend they don't exist and implement them yourself.
13
13
  Execute the tests with:
14
14
 
15
15
  ```bash
16
- $ elixir bob_test.exs
16
+ $ elixir nth_prime_test.exs
17
17
  ```
18
18
 
19
- (Replace `bob_test.exs` with the name of the test file.)
20
-
21
19
  ### Pending tests
22
20
 
23
21
  In the test suites, all but the first test have been skipped.
@@ -1,41 +1,25 @@
1
1
  # Nucleotide Count
2
2
 
3
- Given a DNA string, compute how many times each nucleotide occurs in the string.
3
+ Given a single stranded DNA string, compute how many times each nucleotide occurs in the string.
4
4
 
5
- DNA is represented by an alphabet of the following symbols: 'A', 'C',
6
- 'G', and 'T'.
7
-
8
- Each symbol represents a nucleotide, which is a fancy name for the
9
- particular molecules that happen to make up a large part of DNA.
10
-
11
- Shortest intro to biochemistry EVAR:
5
+ The genetic language of every living thing on the planet is DNA.
6
+ DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides.
7
+ 4 types exist in DNA and these differ only slightly and can be represented as the following symbols: 'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' thymine.
12
8
 
9
+ Here is an analogy:
13
10
  - twigs are to birds nests as
14
- - nucleotides are to DNA and RNA as
15
- - amino acids are to proteins as
16
- - sugar is to starch as
17
- - oh crap lipids
18
-
19
- I'm not going to talk about lipids because they're crazy complex.
20
-
21
- So back to nucleotides.
22
-
23
- DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine
24
- (`G`), and thymine (`T`).
25
-
26
- RNA contains a slightly different set of nucleotides, but we don't care
27
- about that for now.
11
+ - nucleotides are to DNA as
12
+ - legos are to lego houses as
13
+ - words are to sentences as...
28
14
 
29
15
  ## Running tests
30
16
 
31
17
  Execute the tests with:
32
18
 
33
19
  ```bash
34
- $ elixir bob_test.exs
20
+ $ elixir nucleotide_count_test.exs
35
21
  ```
36
22
 
37
- (Replace `bob_test.exs` with the name of the test file.)
38
-
39
23
  ### Pending tests
40
24
 
41
25
  In the test suites, all but the first test have been skipped.
@@ -1,4 +1,4 @@
1
- # Ocr Numbers
1
+ # OCR Numbers
2
2
 
3
3
  Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is
4
4
  represented, or whether it is garbled.
@@ -9,7 +9,7 @@ To begin with, convert a simple binary font to a string containing 0 or 1.
9
9
 
10
10
  The binary font uses pipes and underscores, four rows high and three columns wide.
11
11
 
12
- ```
12
+ ```text
13
13
  _ #
14
14
  | | # zero.
15
15
  |_| #
@@ -18,7 +18,7 @@ The binary font uses pipes and underscores, four rows high and three columns wid
18
18
 
19
19
  Is converted to "0"
20
20
 
21
- ```
21
+ ```text
22
22
  #
23
23
  | # one.
24
24
  | #
@@ -39,7 +39,7 @@ Update your program to recognize multi-character binary strings, replacing garbl
39
39
 
40
40
  Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
41
41
 
42
- ```
42
+ ```text
43
43
  _
44
44
  _|
45
45
  |_
@@ -48,7 +48,7 @@ Update your program to recognize all numbers 0 through 9, both individually and
48
48
 
49
49
  Is converted to "2"
50
50
 
51
- ```
51
+ ```text
52
52
  _ _ _ _ _ _ _ _ #
53
53
  | _| _||_||_ |_ ||_||_|| | # decimal numbers.
54
54
  ||_ _| | _||_| ||_| _||_| #
@@ -61,7 +61,7 @@ Is converted to "1234567890"
61
61
 
62
62
  Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas.
63
63
 
64
- ```
64
+ ```text
65
65
  _ _
66
66
  | _| _|
67
67
  ||_ _|
@@ -83,11 +83,9 @@ Is converted to "123,456,789"
83
83
  Execute the tests with:
84
84
 
85
85
  ```bash
86
- $ elixir bob_test.exs
86
+ $ elixir ocr_numbers_test.exs
87
87
  ```
88
88
 
89
- (Replace `bob_test.exs` with the name of the test file.)
90
-
91
89
  ### Pending tests
92
90
 
93
91
  In the test suites, all but the first test have been skipped.
@@ -5,44 +5,41 @@ Detect palindrome products in a given range.
5
5
  A palindromic number is a number that remains the same when its digits are
6
6
  reversed. For example, `121` is a palindromic number but `112` is not.
7
7
 
8
- Given the definition of a palindromic number, we define a palindrome _product_
9
- to be the product `c`, such that `a * b = c`, where `c` is a palindromic number and
10
- `a` and `b` are integers (possibly, but _not_ necessarily palindromic numbers).
8
+ Given a range of numbers, find the largest and smallest palindromes which
9
+ are products of numbers within that range.
11
10
 
12
- For example, the palindromic number 9009 can be written as the palindrome
13
- product: `91 * 99 = 9009`.
14
-
15
- It's possible (and indeed common) for a palindrome product to be the product
16
- of multiple combinations of numbers. For example, the palindrome product `9` has
17
- the factors `(1, 9)`, `(3, 3)`, and `(9, 1)`.
18
-
19
- Write a program that given a range of integers, returns the smallest and largest
20
- palindromic product within that range, along with all of it's factors.
11
+ Your solution should return the largest and smallest palindromes, along with the
12
+ factors of each within the range. If the largest or smallest palindrome has more
13
+ than one pair of factors within the range, then return all the pairs.
21
14
 
22
15
  ## Example 1
23
16
 
24
17
  Given the range `[1, 9]` (both inclusive)...
25
18
 
26
- The smallest product is `1`. It's factors are `(1, 1)`.
27
- The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`.
19
+ And given the list of all possible products within this range:
20
+ `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 15, 21, 24, 27, 20, 28, 32, 36, 25, 30, 35, 40, 45, 42, 48, 54, 49, 56, 63, 64, 72, 81]`
21
+
22
+ The palindrome products are all single digit numbers (in this case):
23
+ `[1, 2, 3, 4, 5, 6, 7, 8, 9]`
24
+
25
+ The smallest palindrome product is `1`. Its factors are `(1, 1)`.
26
+ The largest palindrome product is `9`. Its factors are `(1, 9)` and `(3, 3)`.
28
27
 
29
28
  ## Example 2
30
29
 
31
30
  Given the range `[10, 99]` (both inclusive)...
32
31
 
33
- The smallest palindrome product is `121`. It's factors are `(11, 11)`.
34
- The largest palindrome product is `9009`. It's factors are `(91, 99)` and `(99, 91)`.
32
+ The smallest palindrome product is `121`. Its factors are `(11, 11)`.
33
+ The largest palindrome product is `9009`. Its factors are `(91, 99)`.
35
34
 
36
35
  ## Running tests
37
36
 
38
37
  Execute the tests with:
39
38
 
40
39
  ```bash
41
- $ elixir bob_test.exs
40
+ $ elixir palindrome_products_test.exs
42
41
  ```
43
42
 
44
- (Replace `bob_test.exs` with the name of the test file.)
45
-
46
43
  ### Pending tests
47
44
 
48
45
  In the test suites, all but the first test have been skipped.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma,
4
4
  "every letter") is a sentence using every letter of the alphabet at least once.
5
- The best known English pangram is:
5
+ The best known English pangram is:
6
6
  > The quick brown fox jumps over the lazy dog.
7
7
 
8
8
  The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case
@@ -13,11 +13,9 @@ insensitive. Input will not contain non-ASCII symbols.
13
13
  Execute the tests with:
14
14
 
15
15
  ```bash
16
- $ elixir bob_test.exs
16
+ $ elixir pangram_test.exs
17
17
  ```
18
18
 
19
- (Replace `bob_test.exs` with the name of the test file.)
20
-
21
19
  ### Pending tests
22
20
 
23
21
  In the test suites, all but the first test have been skipped.
@@ -12,11 +12,9 @@ list of texts and that employs parallelism.
12
12
  Execute the tests with:
13
13
 
14
14
  ```bash
15
- $ elixir bob_test.exs
15
+ $ elixir parallel_letter_frequency_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,11 +1,11 @@
1
- # Pascals Triangle
1
+ # Pascal's Triangle
2
2
 
3
3
  Compute Pascal's triangle up to a given number of rows.
4
4
 
5
5
  In Pascal's Triangle each number is computed by adding the numbers to
6
6
  the right and left of the current position in the previous row.
7
7
 
8
- ```plain
8
+ ```text
9
9
  1
10
10
  1 1
11
11
  1 2 1
@@ -19,11 +19,9 @@ the right and left of the current position in the previous row.
19
19
  Execute the tests with:
20
20
 
21
21
  ```bash
22
- $ elixir bob_test.exs
22
+ $ elixir pascals_triangle_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.
@@ -5,7 +5,7 @@ Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
5
5
 
6
6
  The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9
7
7
 
8
- - **Perfect**: aliquot sum = number
8
+ - **Perfect**: aliquot sum = number
9
9
  - 6 is a perfect number because (1 + 2 + 3) = 6
10
10
  - 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28
11
11
  - **Abundant**: aliquot sum > number
@@ -14,7 +14,7 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d
14
14
  - **Deficient**: aliquot sum < number
15
15
  - 8 is a deficient number because (1 + 2 + 4) = 7
16
16
  - Prime numbers are deficient
17
-
17
+
18
18
  Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**.
19
19
 
20
20
  ## Running tests
@@ -22,11 +22,9 @@ Implement a way to determine whether a given number is **perfect**. Depending on
22
22
  Execute the tests with:
23
23
 
24
24
  ```bash
25
- $ elixir bob_test.exs
25
+ $ elixir perfect_numbers_test.exs
26
26
  ```
27
27
 
28
- (Replace `bob_test.exs` with the name of the test file.)
29
-
30
28
  ### Pending tests
31
29
 
32
30
  In the test suites, all but the first test have been skipped.
@@ -6,14 +6,15 @@ The **North American Numbering Plan (NANP)** is a telephone numbering system use
6
6
 
7
7
  NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*.
8
8
 
9
-
10
9
  The format is usually represented as
11
- ```
10
+
11
+ ```text
12
12
  (NXX)-NXX-XXXX
13
13
  ```
14
+
14
15
  where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9.
15
16
 
16
- Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present.
17
+ Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present.
17
18
 
18
19
  For example, the inputs
19
20
  - `+1 (613)-995-0253`
@@ -32,11 +33,9 @@ should all produce the output
32
33
  Execute the tests with:
33
34
 
34
35
  ```bash
35
- $ elixir bob_test.exs
36
+ $ elixir phone_number_test.exs
36
37
  ```
37
38
 
38
- (Replace `bob_test.exs` with the name of the test file.)
39
-
40
39
  ### Pending tests
41
40
 
42
41
  In the test suites, all but the first test have been skipped.
@@ -22,11 +22,9 @@ See <http://en.wikipedia.org/wiki/Pig_latin> for more details.
22
22
  Execute the tests with:
23
23
 
24
24
  ```bash
25
- $ elixir bob_test.exs
25
+ $ elixir pig_latin_test.exs
26
26
  ```
27
27
 
28
- (Replace `bob_test.exs` with the name of the test file.)
29
-
30
28
  ### Pending tests
31
29
 
32
30
  In the test suites, all but the first test have been skipped.