trackler 2.2.1.39 → 2.2.1.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/CONTRIBUTING.md +4 -4
  4. data/problem-specifications/README.md +5 -1
  5. data/problem-specifications/exercises/acronym/description.md +0 -1
  6. data/problem-specifications/exercises/all-your-base/description.md +1 -1
  7. data/problem-specifications/exercises/allergies/description.md +0 -1
  8. data/problem-specifications/exercises/alphametics/description.md +2 -2
  9. data/problem-specifications/exercises/atbash-cipher/description.md +2 -1
  10. data/problem-specifications/exercises/beer-song/description.md +1 -1
  11. data/problem-specifications/exercises/binary/description.md +2 -0
  12. data/problem-specifications/exercises/book-store/description.md +5 -5
  13. data/problem-specifications/exercises/bowling/description.md +20 -6
  14. data/problem-specifications/exercises/collatz-conjecture/description.md +1 -1
  15. data/problem-specifications/exercises/connect/description.md +1 -1
  16. data/problem-specifications/exercises/crypto-square/description.md +4 -4
  17. data/problem-specifications/exercises/diamond/description.md +6 -6
  18. data/problem-specifications/exercises/etl/description.md +2 -0
  19. data/problem-specifications/exercises/flatten-array/description.md +1 -2
  20. data/problem-specifications/exercises/food-chain/description.md +1 -1
  21. data/problem-specifications/exercises/go-counting/description.md +1 -1
  22. data/problem-specifications/exercises/grade-school/description.md +0 -1
  23. data/problem-specifications/exercises/grains/description.md +0 -1
  24. data/problem-specifications/exercises/grep/description.md +12 -12
  25. data/problem-specifications/exercises/house/description.md +1 -2
  26. data/problem-specifications/exercises/isogram/description.md +2 -1
  27. data/problem-specifications/exercises/kindergarten-garden/description.md +3 -3
  28. data/problem-specifications/exercises/leap/description.md +1 -1
  29. data/problem-specifications/exercises/linked-list/description.md +10 -10
  30. data/problem-specifications/exercises/luhn/description.md +7 -7
  31. data/problem-specifications/exercises/matrix/description.md +6 -4
  32. data/problem-specifications/exercises/meetup/description.md +1 -2
  33. data/problem-specifications/exercises/nucleotide-count/description.md +8 -22
  34. data/problem-specifications/exercises/ocr-numbers/description.md +5 -5
  35. data/problem-specifications/exercises/octal/description.md +6 -2
  36. data/problem-specifications/exercises/pangram/description.md +1 -1
  37. data/problem-specifications/exercises/pascals-triangle/description.md +1 -1
  38. data/problem-specifications/exercises/perfect-numbers/description.md +2 -2
  39. data/problem-specifications/exercises/phone-number/description.md +3 -2
  40. data/problem-specifications/exercises/pov/description.md +2 -2
  41. data/problem-specifications/exercises/protein-translation/description.md +4 -5
  42. data/problem-specifications/exercises/proverb/description.md +12 -9
  43. data/problem-specifications/exercises/pythagorean-triplet/description.md +3 -3
  44. data/problem-specifications/exercises/queen-attack/description.md +1 -1
  45. data/problem-specifications/exercises/rail-fence-cipher/description.md +12 -7
  46. data/problem-specifications/exercises/rectangles/description.md +7 -7
  47. data/problem-specifications/exercises/roman-numerals/description.md +1 -1
  48. data/problem-specifications/exercises/rotational-cipher/description.md +2 -1
  49. data/problem-specifications/exercises/run-length-encoding/description.md +4 -4
  50. data/problem-specifications/exercises/saddle-points/description.md +1 -1
  51. data/problem-specifications/exercises/scale-generator/description.md +0 -1
  52. data/problem-specifications/exercises/scrabble-score/description.md +3 -1
  53. data/problem-specifications/exercises/secret-handshake/description.md +1 -1
  54. data/problem-specifications/exercises/sgf-parsing/description.md +3 -3
  55. data/problem-specifications/exercises/spiral-matrix/description.md +2 -2
  56. data/problem-specifications/exercises/tournament/description.md +5 -5
  57. data/problem-specifications/exercises/transpose/description.md +7 -7
  58. data/problem-specifications/exercises/tree-building/description.md +3 -3
  59. data/problem-specifications/exercises/triangle/description.md +9 -7
  60. data/problem-specifications/exercises/trinary/description.md +1 -1
  61. data/problem-specifications/exercises/twelve-days/description.md +1 -1
  62. data/problem-specifications/exercises/two-bucket/description.md +3 -3
  63. data/problem-specifications/exercises/two-fer/description.md +1 -2
  64. data/problem-specifications/exercises/variable-length-quantity/description.md +6 -7
  65. data/problem-specifications/exercises/word-count/description.md +1 -2
  66. data/problem-specifications/exercises/word-search/description.md +1 -1
  67. data/problem-specifications/exercises/wordy/description.md +0 -5
  68. data/tracks/bash/config.json +0 -1
  69. data/tracks/c/exercises/hello-world/src/example.c +2 -5
  70. data/tracks/c/exercises/hello-world/src/hello_world.c +1 -1
  71. data/tracks/c/exercises/hello-world/src/hello_world.h +1 -1
  72. data/tracks/c/exercises/hello-world/test/test_hello_world.c +3 -22
  73. data/tracks/c/indent.sh +9 -1
  74. data/tracks/ceylon/exercises/leap/README.md +1 -1
  75. data/tracks/cpp/README.md +14 -0
  76. data/tracks/cpp/config.json +219 -219
  77. data/tracks/cpp/config/maintainers.json +11 -11
  78. data/tracks/cpp/docs/TESTS.md +6 -16
  79. data/tracks/cpp/exercises/bracket-push/README.md +42 -0
  80. data/tracks/cpp/exercises/crypto-square/crypto_square_test.cpp +41 -27
  81. data/tracks/cpp/exercises/crypto-square/example.cpp +20 -16
  82. data/tracks/cpp/exercises/gigasecond/gigasecond_test.cpp +1 -1
  83. data/tracks/cpp/exercises/nucleotide-count/README.md +9 -21
  84. data/tracks/cpp/exercises/pangram/README.md +47 -0
  85. data/tracks/cpp/exercises/space-age/README.md +2 -1
  86. data/tracks/csharp/build.cake +16 -10
  87. data/tracks/csharp/build.ps1 +128 -60
  88. data/tracks/csharp/build.sh +53 -27
  89. data/tracks/csharp/exercises/kindergarten-garden/Example.cs +9 -10
  90. data/tracks/csharp/exercises/kindergarten-garden/KindergartenGarden.cs +5 -6
  91. data/tracks/csharp/exercises/kindergarten-garden/KindergartenGardenTest.cs +97 -0
  92. data/tracks/csharp/exercises/ocr-numbers/Example.cs +60 -7
  93. data/tracks/csharp/exercises/ocr-numbers/OcrNumbersTest.cs +136 -91
  94. data/tracks/csharp/exercises/two-bucket/Example.cs +7 -7
  95. data/tracks/csharp/exercises/two-bucket/TwoBucket.cs +4 -4
  96. data/tracks/csharp/exercises/two-bucket/TwoBucketTest.cs +45 -47
  97. data/tracks/csharp/generators/Exercise.cs +6 -1
  98. data/tracks/csharp/generators/Exercises/KindergartenGarden.cs +30 -0
  99. data/tracks/csharp/generators/Exercises/OcrNumbers.cs +29 -0
  100. data/tracks/csharp/generators/Exercises/TwoBucket.cs +49 -0
  101. data/tracks/csharp/generators/Input/CanonicalDataCase.cs +8 -2
  102. data/tracks/csharp/generators/Input/CanonicalDataCaseJsonConverter.cs +21 -4
  103. data/tracks/csharp/generators/Input/CanonicalDataCasesJson.cs +5 -5
  104. data/tracks/csharp/generators/Output/ValueFormatter.cs +2 -0
  105. data/tracks/dart/config.json +77 -65
  106. data/tracks/dart/config/maintainers.json +7 -7
  107. data/tracks/dart/exercises/anagram/README.md +14 -0
  108. data/tracks/dart/exercises/anagram/lib/anagram.dart +3 -0
  109. data/tracks/dart/exercises/anagram/lib/example.dart +52 -0
  110. data/tracks/dart/exercises/anagram/pubspec.lock +293 -0
  111. data/tracks/dart/exercises/anagram/pubspec.yaml +3 -0
  112. data/tracks/dart/exercises/anagram/test/anagram_test.dart +89 -0
  113. data/tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart +8 -8
  114. data/tracks/dart/exercises/rna-transcription/test/rna_transcription_test.dart +6 -6
  115. data/tracks/dart/test/exercises_test.dart +3 -1
  116. data/tracks/delphi/config.json +38 -27
  117. data/tracks/delphi/exercises/allergies/README.md +0 -1
  118. data/tracks/delphi/exercises/beer-song/README.md +1 -1
  119. data/tracks/delphi/exercises/book-store/README.md +5 -5
  120. data/tracks/delphi/exercises/bowling/README.md +20 -6
  121. data/tracks/delphi/exercises/collatz-conjecture/README.md +1 -1
  122. data/tracks/delphi/exercises/etl/README.md +2 -0
  123. data/tracks/delphi/exercises/grains/README.md +0 -1
  124. data/tracks/delphi/exercises/leap/README.md +1 -1
  125. data/tracks/delphi/exercises/nucleotide-count/README.md +8 -22
  126. data/tracks/delphi/exercises/perfect-numbers/README.md +2 -2
  127. data/tracks/delphi/exercises/phone-number/README.md +3 -2
  128. data/tracks/delphi/exercises/pig-latin/PigLatin.dpr +60 -0
  129. data/tracks/delphi/exercises/pig-latin/README.md +45 -0
  130. data/tracks/delphi/exercises/pig-latin/uPigLatinExample.pas +105 -0
  131. data/tracks/delphi/exercises/pig-latin/uTestPigLatin.pas +196 -0
  132. data/tracks/delphi/exercises/roman-numerals/README.md +1 -1
  133. data/tracks/delphi/exercises/saddle-points/README.md +1 -1
  134. data/tracks/delphi/exercises/triangle/README.md +9 -6
  135. data/tracks/delphi/exercises/two-fer/README.md +1 -2
  136. data/tracks/delphi/exercises/wordy/README.md +0 -5
  137. data/tracks/fsharp/build.ps1 +128 -60
  138. data/tracks/fsharp/build.sh +53 -27
  139. data/tracks/java/CONTRIBUTING.md +9 -0
  140. data/tracks/java/config.json +110 -26
  141. data/tracks/javascript/config.json +15 -0
  142. data/tracks/javascript/exercises/twelve-days/README.md +61 -0
  143. data/tracks/javascript/exercises/twelve-days/example.js +51 -0
  144. data/tracks/javascript/exercises/twelve-days/package.json +69 -0
  145. data/tracks/javascript/exercises/twelve-days/twelve-days.spec.js +103 -0
  146. data/tracks/python/docs/SNIPPET.txt +10 -0
  147. data/tracks/python/exercises/acronym/acronym.py +1 -1
  148. data/tracks/python/exercises/alphametics/alphametics_test.py +3 -3
  149. data/tracks/ruby/exercises/simple-cipher/README.md +1 -1
  150. data/tracks/scala/exercises/change/src/test/scala/ChangeTest.scala +7 -2
  151. data/tracks/scala/exercises/hamming/src/test/scala/HammingTest.scala +6 -6
  152. data/tracks/scala/exercises/pangram/src/test/scala/PangramTest.scala +5 -5
  153. data/tracks/scala/exercises/pig-latin/example.scala +9 -28
  154. data/tracks/scala/exercises/pig-latin/src/test/scala/PigLatinTest.scala +16 -6
  155. data/tracks/scala/exercises/queen-attack/example.scala +14 -26
  156. data/tracks/scala/exercises/queen-attack/src/test/scala/QueenAttackTest.scala +71 -0
  157. data/tracks/scala/exercises/rna-transcription/src/test/scala/RnaTranscriptionTest.scala +10 -10
  158. data/tracks/scala/exercises/robot-simulator/src/test/scala/RobotSimulatorTest.scala +127 -0
  159. data/tracks/scala/exercises/saddle-points/example.scala +11 -7
  160. data/tracks/scala/exercises/saddle-points/src/test/scala/SaddlePointsTest.scala +21 -14
  161. data/tracks/scala/exercises/sum-of-multiples/src/test/scala/SumOfMultiplesTest.scala +6 -1
  162. data/tracks/scala/exercises/word-count/example.scala +7 -8
  163. data/tracks/scala/exercises/word-count/src/test/scala/WordCountTest.scala +41 -42
  164. data/tracks/scala/testgen/src/main/resources/version-check-ignore.txt +5 -0
  165. data/tracks/scala/testgen/src/main/scala/QueenAttackTestGenerator.scala +79 -0
  166. data/tracks/scala/testgen/src/main/scala/RobotSimulatorTestGenerator.scala +99 -0
  167. data/tracks/scala/testgen/src/main/scala/SaddlePointsTestGenerator.scala +35 -0
  168. data/tracks/scala/testgen/src/main/scala/VersionCheck.scala +72 -0
  169. data/tracks/scala/testgen/src/main/scala/WordCountTestGenerator.scala +39 -0
  170. data/tracks/swift/exercises/sum-of-multiples/Sources/SumOfMultiplesExample.swift +1 -0
  171. data/tracks/swift/exercises/sum-of-multiples/Tests/SumOfMultiplesTests/SumOfMultiplesTests.swift +5 -0
  172. data/tracks/typescript/config.json +66 -0
  173. data/tracks/typescript/exercises/binary-search-tree/README.md +84 -0
  174. data/tracks/typescript/exercises/binary-search-tree/binary-search-tree.example.ts +55 -0
  175. data/tracks/typescript/exercises/binary-search-tree/binary-search-tree.test.ts +85 -0
  176. data/tracks/typescript/exercises/binary-search-tree/binary-search-tree.ts +0 -0
  177. data/tracks/typescript/exercises/binary-search-tree/package.json +36 -0
  178. data/tracks/typescript/exercises/binary-search-tree/tsconfig.json +22 -0
  179. data/tracks/typescript/exercises/binary-search-tree/tslint.json +127 -0
  180. data/tracks/typescript/exercises/binary-search-tree/yarn.lock +2305 -0
  181. data/tracks/typescript/exercises/clock/README.md +33 -0
  182. data/tracks/typescript/exercises/clock/clock.example.ts +62 -0
  183. data/tracks/typescript/exercises/clock/clock.test.ts +209 -0
  184. data/tracks/typescript/exercises/clock/clock.ts +0 -0
  185. data/tracks/typescript/exercises/clock/package.json +36 -0
  186. data/tracks/typescript/exercises/clock/tsconfig.json +22 -0
  187. data/tracks/typescript/exercises/clock/tslint.json +127 -0
  188. data/tracks/typescript/exercises/clock/yarn.lock +2305 -0
  189. data/tracks/typescript/exercises/linked-list/README.md +55 -0
  190. data/tracks/typescript/exercises/linked-list/linked-list.example.ts +128 -0
  191. data/tracks/typescript/exercises/linked-list/linked-list.test.ts +101 -0
  192. data/tracks/typescript/exercises/linked-list/linked-list.ts +0 -0
  193. data/tracks/typescript/exercises/linked-list/package.json +36 -0
  194. data/tracks/typescript/exercises/linked-list/tsconfig.json +22 -0
  195. data/tracks/typescript/exercises/linked-list/tslint.json +127 -0
  196. data/tracks/typescript/exercises/linked-list/yarn.lock +2305 -0
  197. data/tracks/typescript/exercises/series/README.md +57 -0
  198. data/tracks/typescript/exercises/series/package.json +36 -0
  199. data/tracks/typescript/exercises/series/series.example.ts +27 -0
  200. data/tracks/typescript/exercises/series/series.test.ts +58 -0
  201. data/tracks/typescript/exercises/series/series.ts +0 -0
  202. data/tracks/typescript/exercises/series/tsconfig.json +22 -0
  203. data/tracks/typescript/exercises/series/tslint.json +127 -0
  204. data/tracks/typescript/exercises/series/yarn.lock +2305 -0
  205. data/tracks/typescript/exercises/sum-of-multiples/README.md +44 -0
  206. data/tracks/typescript/exercises/sum-of-multiples/package.json +36 -0
  207. data/tracks/typescript/exercises/sum-of-multiples/sum-of-multiples.example.ts +21 -0
  208. data/tracks/typescript/exercises/sum-of-multiples/sum-of-multiples.test.ts +39 -0
  209. data/tracks/typescript/exercises/sum-of-multiples/sum-of-multiples.ts +0 -0
  210. data/tracks/typescript/exercises/sum-of-multiples/tsconfig.json +22 -0
  211. data/tracks/typescript/exercises/sum-of-multiples/tslint.json +127 -0
  212. data/tracks/typescript/exercises/sum-of-multiples/yarn.lock +2305 -0
  213. metadata +71 -6
  214. data/tracks/csharp/exercises/kindergarten-garden/KinderGartenGardenTest.cs +0 -60
  215. data/tracks/scala/exercises/queen-attack/src/main/scala/Queens.scala +0 -8
  216. data/tracks/scala/exercises/queen-attack/src/test/scala/QueensTest.scala +0 -51
  217. data/tracks/scala/exercises/robot-simulator/src/test/scala/RobotTest.scala +0 -61
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fca8267c61e2d2a124c257a519cdfbf7ee7ab744
4
- data.tar.gz: c219da8898261cf7dfacae62aca2359faf13d76f
3
+ metadata.gz: f995ce4fe305766cbda5eabfcdfe5bfa4f7ebae2
4
+ data.tar.gz: ad03d5401c9a44c5408605405381817715d40c3c
5
5
  SHA512:
6
- metadata.gz: 77bed1ff6d9f160e44c00fb20c12ef430a670f54a0e3c14dec4cbbde0c4669aea7f364cd76067f28ba6e466fdde197fc8afbd43ead4dfe4ecd7a5c0d297bf211
7
- data.tar.gz: 2d31514841ed921bcadaa25aedddf5d673802a757333cd97f9b4e2b8a7a13497a7521d9e5707535f0267860f5d59fa7a9cc69991389bb9d056da205dd5bb2f71
6
+ metadata.gz: fb20fd7f8fc0e98bfe1030abb8c828485695ce43ebb9508183c3fc96d289bc5e8cd332dacf8fbab81698f98b647788497e83c2d81d45d21f6874ad23e7488e12
7
+ data.tar.gz: 1f2a1bda85e248d8e3fa93446ef13c9fb6a30585af1c028a74cff23f3f4d0199306ba6dcf5cbfcc7f2378df2d7cde1e22305e6c3efaa2c652cd9e5372e691e59
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.2.1.39"
2
+ VERSION = "2.2.1.40"
3
3
  end
@@ -95,7 +95,7 @@ the Exercism ecosystem.
95
95
  Each language-specific repository can be found under the Exercism GitHub
96
96
  organization named with the track ID.
97
97
 
98
- ```
98
+ ```text
99
99
  https://github.com/exercism/{TRACK_ID}
100
100
  ```
101
101
 
@@ -241,7 +241,7 @@ A problem must have a unique slug. This slug is used as
241
241
 
242
242
  Each track should have the following structure:
243
243
 
244
- ```bash
244
+ ```text
245
245
  ├── .gitignore
246
246
  ├── .travis.yml
247
247
  ├── LICENSE
@@ -295,7 +295,7 @@ For a track that is set as `"active": false` in the `config.json`, `exercism fet
295
295
  will not automatically pull down problems. You can still test the language by
296
296
  fetching problems directly, e.g.:
297
297
 
298
- ```
298
+ ```shell
299
299
  exercism fetch cpp bob
300
300
  ```
301
301
 
@@ -347,7 +347,7 @@ Please review the details in [README.md](https://github.com/exercism/problem-spe
347
347
 
348
348
  ### Anatomy of an Exercise
349
349
 
350
- See the [anatomy of an exercise](https://github.com/exercism/docs/tree/master/maintaining-a-track/anatomy-of-an-exercise.md) in the docs repository.
350
+ See the [anatomy of an exercise](https://github.com/exercism/docs/tree/master/language-tracks/exercises/anatomy) in the docs repository.
351
351
 
352
352
  ### Track configuration file
353
353
 
@@ -10,7 +10,7 @@ Please see the [contributing guide](https://github.com/exercism/problem-specific
10
10
 
11
11
  Each problem's data lives in a directory under `exercises/`
12
12
 
13
- ```
13
+ ```text
14
14
  exercises/
15
15
  ├── accumulate
16
16
  │   ├── description.md
@@ -169,17 +169,21 @@ In order to run these tests, you will need to have `node` and `npm` installed on
169
169
  Install them from [here](https://nodejs.org/en/). (`npm` comes bundled with most installations of `node`).
170
170
 
171
171
  Install the required packages:
172
+
172
173
  ```shell
173
174
  npm install
174
175
  ```
175
176
 
176
177
  Run for all exercises:
178
+
177
179
  ```shell
178
180
  npm test
179
181
  ```
180
182
 
181
183
  Run for single exercise:
184
+
182
185
  ```shell
183
186
  npm run test-one exercises/<exercise>/canonical-data.json
184
187
  ```
188
+
185
189
  Replace `<exercise>` by the name of exercise which you want to check.
@@ -4,4 +4,3 @@ Techies love their TLA (Three Letter Acronyms)!
4
4
 
5
5
  Help generate some jargon by writing a program that converts a long name
6
6
  like Portable Network Graphics to its acronym (PNG).
7
-
@@ -4,6 +4,7 @@ Implement general base conversion. Given a number in base **a**,
4
4
  represented as a sequence of digits, convert it to base **b**.
5
5
 
6
6
  ## Note
7
+
7
8
  - Try to implement the conversion yourself.
8
9
  Do not use something else to perform the conversion for you.
9
10
 
@@ -26,5 +27,4 @@ The number 1120, *in base 3*, means:
26
27
 
27
28
  I think you got the idea!
28
29
 
29
-
30
30
  *Yes. Those three numbers above are exactly the same. Congratulations!*
@@ -26,4 +26,3 @@ Note: a given score may include allergens **not** listed above (i.e.
26
26
  allergens that score 256, 512, 1024, etc.). Your program should
27
27
  ignore those components of the score. For example, if the allergy
28
28
  score is 257, your program should only report the eggs (1) allergy.
29
-
@@ -5,7 +5,7 @@ letters in words are replaced with numbers.
5
5
 
6
6
  For example `SEND + MORE = MONEY`:
7
7
 
8
- ```
8
+ ```text
9
9
  S E N D
10
10
  M O R E +
11
11
  -----------
@@ -14,7 +14,7 @@ M O N E Y
14
14
 
15
15
  Replacing these with valid numbers gives:
16
16
 
17
- ```
17
+ ```text
18
18
  9 5 6 7
19
19
  1 0 8 5 +
20
20
  -----------
@@ -7,7 +7,7 @@ letter, the second with the second-last, and so on.
7
7
 
8
8
  An Atbash cipher for the Latin alphabet would be as follows:
9
9
 
10
- ```plain
10
+ ```text
11
11
  Plain: abcdefghijklmnopqrstuvwxyz
12
12
  Cipher: zyxwvutsrqponmlkjihgfedcba
13
13
  ```
@@ -21,6 +21,7 @@ being 5 letters, and punctuation is excluded. This is to make it harder to guess
21
21
  things based on word boundaries.
22
22
 
23
23
  ## Examples
24
+
24
25
  - Encoding `test` gives `gvhg`
25
26
  - Decoding `gvhg` gives `test`
26
27
  - Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
@@ -2,7 +2,7 @@ Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles
2
2
 
3
3
  Note that not all verses are identical.
4
4
 
5
- ```plain
5
+ ```text
6
6
  99 bottles of beer on the wall, 99 bottles of beer.
7
7
  Take one down and pass it around, 98 bottles of beer on the wall.
8
8
 
@@ -5,10 +5,12 @@ string, your program should produce a decimal output. The
5
5
  program should handle invalid inputs.
6
6
 
7
7
  ## Note
8
+
8
9
  - Implement the conversion yourself.
9
10
  Do not use something else to perform the conversion for you.
10
11
 
11
12
  ## About Binary (Base-2)
13
+
12
14
  Decimal is a base-10 system.
13
15
 
14
16
  A number 23 in base 10 notation can be understood
@@ -1,20 +1,20 @@
1
1
  To try and encourage more sales of different books from a popular 5 book
2
2
  series, a bookshop has decided to offer discounts on multiple book purchases.
3
3
 
4
- One copy of any of the five books costs $8.
4
+ One copy of any of the five books costs $8.
5
5
 
6
6
  If, however, you buy two different books, you get a 5%
7
7
  discount on those two books.
8
8
 
9
- If you buy 3 different books, you get a 10% discount.
9
+ If you buy 3 different books, you get a 10% discount.
10
10
 
11
11
  If you buy 4 different books, you get a 20% discount.
12
12
 
13
- If you buy all 5, you get a 25% discount.
13
+ If you buy all 5, you get a 25% discount.
14
14
 
15
15
  Note: that if you buy four books, of which 3 are
16
16
  different titles, you get a 10% discount on the 3 that
17
- form part of a set, but the fourth book still costs $8.
17
+ form part of a set, but the fourth book still costs $8.
18
18
 
19
19
  Your mission is to write a piece of code to calculate the
20
20
  price of any conceivable shopping basket (containing only
@@ -28,7 +28,7 @@ For example, how much does this basket of books cost?
28
28
  - 2 copies of the third book
29
29
  - 1 copy of the fourth book
30
30
  - 1 copy of the fifth book
31
-
31
+
32
32
  One way of grouping these 8 books is:
33
33
 
34
34
  - 1 group of 5 --> 25% discount (1st,2nd,3rd,4th,5th)
@@ -1,18 +1,28 @@
1
1
  Score a bowling game.
2
2
 
3
- Bowling is game where players roll a heavy ball to knock down pins
3
+ Bowling is a game where players roll a heavy ball to knock down pins
4
4
  arranged in a triangle. Write code to keep track of the score
5
5
  of a game of bowling.
6
6
 
7
7
  ## Scoring Bowling
8
8
 
9
- The game consists of 10 frames. A frame is composed of one or two ball throws with 10 pins standing at frame initialization. There are three cases for the tabulation of a frame.
9
+ The game consists of 10 frames. A frame is composed of one or two ball
10
+ throws with 10 pins standing at frame initialization. There are three
11
+ cases for the tabulation of a frame.
10
12
 
11
- * An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down.
13
+ * An open frame is where a score of less than 10 is recorded for the
14
+ frame. In this case the score for the frame is the number of pins
15
+ knocked down.
12
16
 
13
- * A spare is where all ten pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in their next throw.
17
+ * A spare is where all ten pins are knocked down by the second
18
+ throw. The total value of a spare is 10 plus the number of pins
19
+ knocked down in their next throw.
14
20
 
15
- * A strike is where all ten pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in their next two throws. If a strike is immediately followed by a second strike, then we can not total the value of first strike until they throw the ball one more time.
21
+ * A strike is where all ten pins are knocked down by the first
22
+ throw. The total value of a strike is 10 plus the number of pins
23
+ knocked down in the next two throws. If a strike is immediately
24
+ followed by a second strike, then the value of the first strike
25
+ cannot be determined until the ball is thrown one more time.
16
26
 
17
27
  Here is a three frame example:
18
28
 
@@ -28,7 +38,11 @@ Frame 3 is (9 + 0) = 9
28
38
 
29
39
  This means the current running total is 48.
30
40
 
31
- The tenth frame in the game is a special case. If someone throws a strike or a spare then they get a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down.
41
+ The tenth frame in the game is a special case. If someone throws a
42
+ strike or a spare then they get a fill ball. Fill balls exist to
43
+ calculate the total of the 10th frame. Scoring a strike or spare on
44
+ the fill ball does not give the player more fill balls. The total
45
+ value of the 10th frame is the total number of pins knocked down.
32
46
 
33
47
  For a tenth frame of X1/ (strike and a spare), the total value is 20.
34
48
 
@@ -8,6 +8,7 @@ always reach 1 eventually.
8
8
  Given a number n, return the number of steps required to reach 1.
9
9
 
10
10
  ## Examples
11
+
11
12
  Starting with n = 12, the steps would be as follows:
12
13
 
13
14
  0. 12
@@ -22,4 +23,3 @@ Starting with n = 12, the steps would be as follows:
22
23
  9. 1
23
24
 
24
25
  Resulting in 9 steps. So for input n = 12, the return value would be 9.
25
-
@@ -16,7 +16,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair".
16
16
  The boards look like this (with spaces added for readability, which won't be in
17
17
  the representation passed to your code):
18
18
 
19
- ```
19
+ ```text
20
20
  . O . X .
21
21
  . X X O .
22
22
  O O O X .
@@ -24,7 +24,7 @@ and `r` is the number of rows.
24
24
  Our normalized text is 54 characters long, dictating a rectangle with
25
25
  `c = 8` and `r = 7`:
26
26
 
27
- ```plain
27
+ ```text
28
28
  ifmanwas
29
29
  meanttos
30
30
  tayonthe
@@ -39,7 +39,7 @@ right.
39
39
 
40
40
  The message above is coded as:
41
41
 
42
- ```plain
42
+ ```text
43
43
  imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
44
44
  ```
45
45
 
@@ -47,14 +47,14 @@ Output the encoded text in chunks. Phrases that fill perfect squares
47
47
  `(r X r)` should be output in `r`-length chunks separated by spaces.
48
48
  Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.
49
49
 
50
- ```plain
50
+ ```text
51
51
  imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
52
52
  ```
53
53
 
54
54
  Notice that were we to stack these, we could visually decode the
55
55
  cyphertext back in to the original message:
56
56
 
57
- ```plain
57
+ ```text
58
58
  imtgdvs
59
59
  fearwer
60
60
  mayoogo
@@ -1,5 +1,5 @@
1
- The diamond kata takes as its input a letter, and outputs it in a diamond
2
- shape. Given a letter, it prints a diamond starting with 'A', with the
1
+ The diamond kata takes as its input a letter, and outputs it in a diamond
2
+ shape. Given a letter, it prints a diamond starting with 'A', with the
3
3
  supplied letter at the widest point.
4
4
 
5
5
  ## Requirements
@@ -13,7 +13,7 @@ supplied letter at the widest point.
13
13
  * The diamond has a square shape (width equals height).
14
14
  * The letters form a diamond shape.
15
15
  * The top half has the letters in ascending order.
16
- * The bottom half has the letters in descending order.
16
+ * The bottom half has the letters in descending order.
17
17
  * The four corners (containing the spaces) are triangles.
18
18
 
19
19
  ## Examples
@@ -22,13 +22,13 @@ In the following examples, spaces are indicated by `·` characters.
22
22
 
23
23
  Diamond for letter 'A':
24
24
 
25
- ```plain
25
+ ```text
26
26
  A
27
27
  ```
28
28
 
29
29
  Diamond for letter 'C':
30
30
 
31
- ```plain
31
+ ```text
32
32
  ··A··
33
33
  ·B·B·
34
34
  C···C
@@ -38,7 +38,7 @@ C···C
38
38
 
39
39
  Diamond for letter 'E':
40
40
 
41
- ```plain
41
+ ```text
42
42
  ····A····
43
43
  ···B·B···
44
44
  ··C···C··
@@ -1,6 +1,7 @@
1
1
  We are going to do the `Transform` step of an Extract-Transform-Load.
2
2
 
3
3
  ### ETL
4
+
4
5
  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
5
6
  we're going to migrate this."
6
7
 
@@ -9,6 +10,7 @@ once." That's then typically followed by much forehead slapping and
9
10
  moaning about how stupid we could possibly be.)
10
11
 
11
12
  ### The goal
13
+
12
14
  We're going to extract some scrabble scores from a legacy system.
13
15
 
14
16
  The old system stored a list of letters per score:
@@ -1,10 +1,9 @@
1
1
  Take a nested list and return a single flattened list with all values except nil/null.
2
2
 
3
3
  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.
4
-
4
+
5
5
  For Example
6
6
 
7
7
  input: [1,[2,3,null,4],[null],5]
8
8
 
9
9
  output: [1,2,3,4,5]
10
-
@@ -8,7 +8,7 @@ This is a [cumulative song](http://en.wikipedia.org/wiki/Cumulative_song) of unk
8
8
 
9
9
  This is one of many common variants.
10
10
 
11
- ```plain
11
+ ```text
12
12
  I know an old lady who swallowed a fly.
13
13
  I don't know why she swallowed the fly. Perhaps she'll die.
14
14
 
@@ -14,7 +14,7 @@ only horizontal and vertical neighbours count. In the following diagram
14
14
  the stones which matter are marked "O" and the stones that don't are
15
15
  marked "I" (ignored). Empty spaces represent empty intersections.
16
16
 
17
- ```
17
+ ```text
18
18
  +----+
19
19
  |IOOI|
20
20
  |O O|
@@ -19,7 +19,6 @@ In the end, you should be able to:
19
19
  Note that all our students only have one name. (It's a small town, what
20
20
  do you want?)
21
21
 
22
-
23
22
  ## For bonus points
24
23
 
25
24
  Did you get the tests passing and the code clean? If you want to, these
@@ -13,7 +13,6 @@ Write code that shows:
13
13
  - how many grains were on each square, and
14
14
  - the total number of grains
15
15
 
16
-
17
16
  ## For bonus points
18
17
 
19
18
  Did you get the tests passing and the code clean? If you want to, these
@@ -1,14 +1,14 @@
1
1
  Search a file for lines matching a regular expression pattern. Return the line
2
2
  number and contents of each matching line.
3
3
 
4
- The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
4
+ The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
5
5
  that match a user-provided search query (known as the *pattern*).
6
6
 
7
7
  The `grep` command takes three arguments:
8
8
 
9
- 1. The pattern used to match lines in a file.
9
+ 1. The pattern used to match lines in a file.
10
10
  2. Zero or more flags to customize the matching behavior.
11
- 3. One or more files in which to search for matching lines.
11
+ 3. One or more files in which to search for matching lines.
12
12
 
13
13
  Your task is to implement the `grep` function, which should read the contents
14
14
  of the specified files, find the lines that match the specified pattern
@@ -18,18 +18,18 @@ in the first file being output first.
18
18
 
19
19
  As an example, suppose there is a file named "input.txt" with the following contents:
20
20
 
21
- <pre>
21
+ ```text
22
22
  hello
23
23
  world
24
24
  hello again
25
- </pre>
25
+ ```
26
26
 
27
27
  If we were to call `grep "hello" input.txt`, the returned string should be:
28
28
 
29
- <pre>
29
+ ```text
30
30
  hello
31
31
  hello again
32
- </pre>
32
+ ```
33
33
 
34
34
  ### Flags
35
35
 
@@ -44,18 +44,18 @@ As said earlier, the `grep` command should also support the following flags:
44
44
  If we run `grep -n "hello" input.txt`, the `-n` flag will require the matching
45
45
  lines to be prefixed with its line number:
46
46
 
47
- <pre>
47
+ ```text
48
48
  1:hello
49
49
  3:hello again
50
- </pre>
50
+ ```
51
51
 
52
- And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
52
+ And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
53
53
  and the output will be:
54
54
 
55
- <pre>
55
+ ```text
56
56
  hello
57
57
  hello again
58
- </pre>
58
+ ```
59
59
 
60
60
  The `grep` command should support multiple flags at once.
61
61