trackler 2.1.0.18 → 2.1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/common/bin/transfer_blurb_to_description.rb +56 -0
  3. data/common/exercises/accumulate/description.md +2 -0
  4. data/common/exercises/acronym/canonical-data.json +1 -7
  5. data/common/exercises/acronym/description.md +2 -0
  6. data/common/exercises/all-your-base/description.md +2 -0
  7. data/common/exercises/allergies/description.md +2 -0
  8. data/common/exercises/alphametics/description.md +2 -0
  9. data/common/exercises/anagram/description.md +2 -0
  10. data/common/exercises/atbash-cipher/description.md +2 -0
  11. data/common/exercises/bank-account/description.md +2 -0
  12. data/common/exercises/beer-song/description.md +2 -0
  13. data/common/exercises/binary/description.md +2 -0
  14. data/common/exercises/binary-search/description.md +2 -0
  15. data/common/exercises/binary-search-tree/description.md +2 -0
  16. data/common/exercises/bob/description.md +2 -0
  17. data/common/exercises/book-store/description.md +2 -0
  18. data/common/exercises/bowling/description.md +2 -0
  19. data/common/exercises/bracket-push/description.md +2 -0
  20. data/common/exercises/change/description.md +2 -0
  21. data/common/exercises/circular-buffer/description.md +2 -0
  22. data/common/exercises/clock/description.md +2 -0
  23. data/common/exercises/connect/description.md +2 -0
  24. data/common/exercises/counter/description.md +2 -0
  25. data/common/exercises/crypto-square/description.md +2 -0
  26. data/common/exercises/custom-set/description.md +2 -0
  27. data/common/exercises/diamond/description.md +2 -0
  28. data/common/exercises/difference-of-squares/description.md +2 -0
  29. data/common/exercises/diffie-hellman/description.md +2 -0
  30. data/common/exercises/dominoes/description.md +2 -0
  31. data/common/exercises/dot-dsl/description.md +2 -0
  32. data/common/exercises/error-handling/description.md +2 -0
  33. data/common/exercises/etl/description.md +2 -0
  34. data/common/exercises/flatten-array/description.md +2 -0
  35. data/common/exercises/food-chain/description.md +2 -0
  36. data/common/exercises/forth/description.md +2 -0
  37. data/common/exercises/gigasecond/description.md +2 -0
  38. data/common/exercises/go-counting/description.md +2 -0
  39. data/common/exercises/grade-school/description.md +2 -0
  40. data/common/exercises/grains/description.md +2 -0
  41. data/common/exercises/grep/description.md +2 -0
  42. data/common/exercises/hamming/description.md +2 -0
  43. data/common/exercises/hangman/description.md +2 -0
  44. data/common/exercises/hello-world/description.md +2 -0
  45. data/common/exercises/hexadecimal/description.md +2 -0
  46. data/common/exercises/house/description.md +2 -0
  47. data/common/exercises/isogram/description.md +2 -0
  48. data/common/exercises/kindergarten-garden/description.md +2 -0
  49. data/common/exercises/largest-series-product/description.md +2 -0
  50. data/common/exercises/leap/description.md +2 -0
  51. data/common/exercises/ledger/description.md +2 -0
  52. data/common/exercises/lens-person/description.md +2 -0
  53. data/common/exercises/linked-list/description.md +2 -0
  54. data/common/exercises/list-ops/description.md +2 -0
  55. data/common/exercises/luhn/description.md +2 -0
  56. data/common/exercises/markdown/description.md +2 -0
  57. data/common/exercises/matrix/description.md +2 -0
  58. data/common/exercises/meetup/description.md +2 -0
  59. data/common/exercises/minesweeper/description.md +2 -0
  60. data/common/exercises/nth-prime/description.md +2 -0
  61. data/common/exercises/nucleotide-codons/description.md +2 -0
  62. data/common/exercises/nucleotide-count/description.md +2 -0
  63. data/common/exercises/ocr-numbers/description.md +2 -0
  64. data/common/exercises/octal/description.md +2 -0
  65. data/common/exercises/paasio/description.md +2 -0
  66. data/common/exercises/palindrome-products/description.md +2 -0
  67. data/common/exercises/parallel-letter-frequency/description.md +2 -0
  68. data/common/exercises/pascals-triangle/description.md +2 -0
  69. data/common/exercises/perfect-numbers/description.md +2 -0
  70. data/common/exercises/phone-number/description.md +2 -0
  71. data/common/exercises/pig-latin/description.md +2 -0
  72. data/common/exercises/point-mutations/description.md +2 -0
  73. data/common/exercises/poker/canonical-data.json +317 -0
  74. data/common/exercises/poker/description.md +2 -0
  75. data/common/exercises/pov/description.md +2 -0
  76. data/common/exercises/prime-factors/description.md +2 -0
  77. data/common/exercises/protein-translation/description.md +2 -0
  78. data/common/exercises/proverb/description.md +2 -0
  79. data/common/exercises/pythagorean-triplet/description.md +2 -0
  80. data/common/exercises/queen-attack/description.md +2 -0
  81. data/common/exercises/rail-fence-cipher/description.md +2 -0
  82. data/common/exercises/raindrops/description.md +2 -0
  83. data/common/exercises/react/description.md +2 -0
  84. data/common/exercises/rectangles/description.md +2 -0
  85. data/common/exercises/rna-transcription/description.md +2 -0
  86. data/common/exercises/robot-name/description.md +2 -0
  87. data/common/exercises/robot-simulator/description.md +2 -0
  88. data/common/exercises/roman-numerals/description.md +2 -0
  89. data/common/exercises/rotational-cipher/description.md +2 -0
  90. data/common/exercises/run-length-encoding/description.md +2 -0
  91. data/common/exercises/saddle-points/description.md +2 -0
  92. data/common/exercises/say/description.md +2 -0
  93. data/common/exercises/scale-generator/description.md +2 -0
  94. data/common/exercises/scrabble-score/description.md +2 -0
  95. data/common/exercises/secret-handshake/description.md +2 -0
  96. data/common/exercises/series/description.md +2 -0
  97. data/common/exercises/sgf-parsing/description.md +2 -0
  98. data/common/exercises/sieve/description.md +2 -0
  99. data/common/exercises/simple-cipher/description.md +2 -0
  100. data/common/exercises/simple-linked-list/description.md +2 -0
  101. data/common/exercises/space-age/description.md +2 -0
  102. data/common/exercises/strain/description.md +2 -0
  103. data/common/exercises/sublist/description.md +2 -0
  104. data/common/exercises/sum-of-multiples/description.md +2 -0
  105. data/common/exercises/transpose/description.md +2 -0
  106. data/common/exercises/tree-building/description.md +2 -0
  107. data/common/exercises/triangle/description.md +2 -0
  108. data/common/exercises/trinary/description.md +2 -0
  109. data/common/exercises/twelve-days/description.md +2 -0
  110. data/common/exercises/two-bucket/description.md +2 -0
  111. data/common/exercises/variable-length-quantity/description.md +2 -0
  112. data/common/exercises/word-count/description.md +2 -0
  113. data/common/exercises/word-search/description.md +2 -0
  114. data/common/exercises/wordy/description.md +2 -0
  115. data/common/exercises/zebra-puzzle/description.md +2 -0
  116. data/common/exercises/zipper/description.md +2 -0
  117. data/fixtures/tracks/fake/{hello-world → exercises/hello-world}/example.ext +0 -0
  118. data/fixtures/tracks/fake/{hello-world → exercises/hello-world}/hello_test.ext +0 -0
  119. data/fixtures/tracks/fake/{hello-world → exercises/hello-world}/world_test.ext +0 -0
  120. data/fixtures/tracks/fake/{one → exercises/one}/.dot +0 -0
  121. data/fixtures/tracks/fake/{one → exercises/one}/Fakefile +0 -0
  122. data/fixtures/tracks/fake/{one → exercises/one}/HINTS.md +0 -0
  123. data/fixtures/tracks/fake/{one → exercises/one}/example.ext +0 -0
  124. data/fixtures/tracks/fake/{one → exercises/one}/one_test.ext +0 -0
  125. data/fixtures/tracks/fake/{one → exercises/one}/sub/src/ExampleFile.ext +0 -0
  126. data/fixtures/tracks/fake/{one → exercises/one}/sub/src/stubfile.ext +0 -0
  127. data/fixtures/tracks/fake/{three → exercises/three}/example.ext +0 -0
  128. data/fixtures/tracks/fake/{three → exercises/three}/three_test.ext +0 -0
  129. data/fixtures/tracks/fake/{two → exercises/two}/example.ext +0 -0
  130. data/fixtures/tracks/fake/{two → exercises/two}/two_test.ext +0 -0
  131. data/lib/trackler/implementation.rb +29 -35
  132. data/lib/trackler/implementations.rb +7 -1
  133. data/lib/trackler/track.rb +4 -3
  134. data/lib/trackler/version.rb +1 -1
  135. data/lib/trackler.rb +1 -1
  136. data/tracks/ecmascript/.github/stale.yml +6 -0
  137. data/tracks/ecmascript/README.md +17 -9
  138. data/tracks/go/README.md +7 -4
  139. data/tracks/go/config.json +5 -2
  140. data/tracks/go/exercises/atbash-cipher/.meta/gen.go +0 -2
  141. data/tracks/go/exercises/bob/.meta/gen.go +0 -2
  142. data/tracks/go/exercises/bowling/.meta/gen.go +0 -2
  143. data/tracks/go/exercises/bracket-push/.meta/gen.go +0 -2
  144. data/tracks/go/exercises/change/.meta/gen.go +0 -2
  145. data/tracks/go/exercises/clock/.meta/gen.go +0 -2
  146. data/tracks/go/exercises/clock/example_clock_test.go +34 -20
  147. data/tracks/go/exercises/connect/.meta/gen.go +0 -2
  148. data/tracks/go/exercises/custom-set/.meta/gen.go +0 -2
  149. data/tracks/go/exercises/forth/.meta/gen.go +0 -2
  150. data/tracks/go/exercises/gigasecond/.meta/gen.go +0 -2
  151. data/tracks/go/exercises/hamming/.meta/gen.go +0 -2
  152. data/tracks/go/exercises/largest-series-product/.meta/gen.go +0 -2
  153. data/tracks/go/exercises/leap/.meta/gen.go +0 -2
  154. data/tracks/go/exercises/luhn/.meta/gen.go +0 -2
  155. data/tracks/go/exercises/meetup/.meta/gen.go +0 -2
  156. data/tracks/go/exercises/phone-number/.meta/gen.go +0 -2
  157. data/tracks/go/exercises/raindrops/.meta/gen.go +0 -2
  158. data/tracks/go/exercises/rna-transcription/.meta/gen.go +0 -2
  159. data/tracks/go/exercises/roman-numerals/.meta/gen.go +0 -2
  160. data/tracks/go/exercises/scrabble-score/.meta/gen.go +0 -2
  161. data/tracks/go/exercises/transpose/.meta/gen.go +0 -2
  162. data/tracks/go/exercises/variable-length-quantity/.meta/gen.go +113 -0
  163. data/tracks/go/exercises/variable-length-quantity/cases_test.go +161 -0
  164. data/tracks/go/exercises/variable-length-quantity/example.go +54 -11
  165. data/tracks/go/exercises/variable-length-quantity/variable_length_quantity_test.go +19 -31
  166. data/tracks/go/exercises/word-count/.meta/gen.go +0 -2
  167. data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +3 -16
  168. data/tracks/java/exercises/diamond/src/test/java/DiamondPrinterTest.java +1 -1
  169. data/tracks/java/exercises/hello-world/HINT.md +7 -0
  170. data/tracks/java/exercises/largest-series-product/src/test/java/LargestSeriesProductCalculatorTest.java +1 -1
  171. data/tracks/java/exercises/linked-list/src/test/java/DoublyLinkedListTest.java +48 -38
  172. data/tracks/java/exercises/luhn/src/main/java/LuhnValidator.java +7 -0
  173. data/tracks/java/exercises/minesweeper/src/test/java/MinesweeperBoardTest.java +1 -1
  174. data/tracks/java/exercises/perfect-numbers/src/test/java/NaturalNumberTest.java +1 -1
  175. data/tracks/java/exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java +1 -1
  176. data/tracks/java/exercises/rectangles/src/test/java/RectangleCounterTest.java +1 -1
  177. data/tracks/java/exercises/secret-handshake/src/main/java/HandshakeCalculator.java +5 -1
  178. data/tracks/java/exercises/sum-of-multiples/src/main/java/SumOfMultiples.java +10 -2
  179. data/tracks/java/exercises/triangle/src/example/java/Triangle.java +5 -5
  180. data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +1 -3
  181. data/tracks/java/exercises/triangle/src/main/java/Triangle.java +11 -0
  182. data/tracks/java/exercises/triangle/src/main/java/TriangleException.java +1 -3
  183. data/tracks/javascript/.github/stale.yml +6 -0
  184. data/tracks/javascript/config.json +14 -0
  185. data/tracks/kotlin/docs/INSTALLATION.md +1 -1
  186. data/tracks/lisp/docs/INSTALLATION.md +1 -0
  187. data/tracks/perl6/README.md +9 -4
  188. data/tracks/perl6/config.json +5 -0
  189. data/tracks/perl6/exercises/luhn/Example.pm6 +15 -0
  190. data/tracks/perl6/exercises/luhn/Luhn.pm6 +4 -0
  191. data/tracks/perl6/exercises/luhn/example.yaml +6 -0
  192. data/tracks/perl6/exercises/luhn/luhn.t +122 -0
  193. data/tracks/python/exercises/acronym/acronym_test.py +1 -4
  194. data/tracks/r/exercises/hamming/test_hamming.R +15 -14
  195. data/tracks/ruby/lib/generator/command_line/generator_optparser.rb +3 -1
  196. data/tracks/ruby/lib/generator/exercise_case/assertion.rb +33 -5
  197. data/tracks/ruby/lib/generator/exercise_case/case_helpers.rb +39 -0
  198. data/tracks/ruby/lib/generator/exercise_case.rb +3 -37
  199. data/tracks/ruby/lib/generator/template_values.rb +2 -0
  200. data/tracks/ruby/test/generator/command_line/generator_optparser_test.rb +11 -2
  201. data/tracks/ruby/test/generator/exercise_case/case_helpers_test.rb +43 -0
  202. data/tracks/ruby/test/generator/underscore_test.rb +4 -0
  203. data/tracks/scala/config.json +10 -0
  204. data/tracks/scala/exercises/beer-song/build.sbt +3 -0
  205. data/tracks/scala/exercises/beer-song/example.scala +11 -0
  206. data/tracks/{java/exercises/luhn/src/main/java → scala/exercises/beer-song/src/main/scala}/.keep +0 -0
  207. data/tracks/scala/exercises/beer-song/src/test/scala/BeerSongTest.scala +52 -0
  208. data/tracks/vimscript/.travis.yml +13 -2
  209. data/tracks/vimscript/TRACK_HINTS.md +67 -0
  210. data/tracks/vimscript/bin/ci +21 -0
  211. data/tracks/vimscript/config.json +22 -8
  212. data/tracks/vimscript/docs/ABOUT.md +44 -0
  213. data/tracks/vimscript/docs/INSTALLATION.md +55 -0
  214. data/tracks/vimscript/docs/LEARNING.md +16 -0
  215. data/tracks/vimscript/docs/RESOURCES.md +24 -0
  216. data/tracks/vimscript/docs/TESTS.md +67 -0
  217. data/tracks/vimscript/exercises/bob/bob.vader +63 -0
  218. data/tracks/vimscript/exercises/bob/bob.vim +8 -0
  219. data/tracks/vimscript/exercises/bob/example.vim +23 -0
  220. data/tracks/vimscript/exercises/hamming/example.vim +18 -0
  221. data/tracks/vimscript/exercises/hamming/hamming.vader +20 -0
  222. data/tracks/vimscript/exercises/hamming/hamming.vim +13 -0
  223. data/tracks/vimscript/exercises/hello-world/example.vim +4 -0
  224. data/tracks/vimscript/exercises/hello-world/hello_world.vader +8 -0
  225. data/tracks/vimscript/exercises/hello-world/hello_world.vim +20 -0
  226. data/tracks/vimscript/exercises/leap/example.vim +3 -0
  227. data/tracks/vimscript/exercises/leap/leap.vader +11 -0
  228. data/tracks/vimscript/exercises/leap/leap.vim +9 -0
  229. metadata +47 -18
  230. data/tracks/vimscript/SETUP.md +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 699aa71d406aeae5f2929cca3f9cff8960929312
4
- data.tar.gz: f7b3ecaa31574dea13f65d401f0c01dcc5c3ae2c
3
+ metadata.gz: 2d6ac1a44061082046f6a5d3b58fd73dfebf3fbd
4
+ data.tar.gz: 96a6b24af274b1524bfc6264aabf63f6fb3d9bb8
5
5
  SHA512:
6
- metadata.gz: 376c215f4dde84b255030179130d4c205adebdf3601cc99dd58cff52d7a236afc12413257f968be0976b04dae7b8c619282f1df0853d230532bb34a9bd99f310
7
- data.tar.gz: bcdb38e3b1233aa1a3dc2e859409928c3c11a7fe1d9a07968941d04d2a724a35bab8abfc2da65c967fab30575f3abc088c0e67f74c32125c1a9c743418dce909
6
+ metadata.gz: 0e5f615e31da2f867efd6f40d40e526ca1497c909670527e226bf3c21568ac232845a36bd293c7bc3acb537adff990c83c9316bae4890361b3619629ba81046c
7
+ data.tar.gz: 1ccb4b4aa381b721b6acf5337ded3154970e7c00f80011db5c9212ed73c6e37c67e5461a1101a004fd5c82da8d447ea1a3d942148d5b6074058b73616da5a6f1
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This is a temporary file which exists to support the x-common issue #767
4
+ # [Make description.md self contained.](# https://github.com/exercism/x-common/issues/767)
5
+ #
6
+ # The exercise description given in description.md should be complete and self
7
+ # contained, and not require the addition of the blurb to make sense.
8
+ #
9
+ # This script copies the current blurb into description.md for all exercises.
10
+ #
11
+ # It will NOT update the description if it already begins with the blurb.
12
+ # Thus this script will not add multiple blurbs if it is run multiple times.
13
+
14
+ require 'yaml'
15
+
16
+ class Exercise
17
+ attr_reader :path
18
+ def initialize(path)
19
+ @path = path
20
+ end
21
+
22
+ def update_description
23
+ unless description.start_with?(blurb)
24
+ complete_description = format("%s\n\n%s", blurb, description)
25
+ File.write(description_filename, complete_description)
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def blurb
32
+ metadata['blurb']
33
+ end
34
+
35
+ def metadata
36
+ metadata_filename = File.join(path, 'metadata.yml')
37
+ YAML.load_file(metadata_filename)
38
+ end
39
+
40
+ def description
41
+ File.read(description_filename)
42
+ end
43
+
44
+ def description_filename
45
+ File.join(path, 'description.md')
46
+ end
47
+ end
48
+
49
+
50
+ exercises = Dir.glob('exercises/*').map {|path| Exercise.new(path)}
51
+
52
+ updated = exercises.count do |exercise|
53
+ exercise.update_description
54
+ end
55
+
56
+ puts "#{updated}/#{exercises.count} exercises updated"
@@ -1,3 +1,5 @@
1
+ Implement the `accumulate` operation, which, given a collection and an operation to perform on each element of the collection, returns a new collection containing the result of applying that operation to each element of the input collection.
2
+
1
3
  Given the collection of numbers:
2
4
 
3
5
  - 1, 2, 3, 4, 5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "exercise": "acronym",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "cases": [
5
5
  {
6
6
  "description": "Abbreviate a phrase",
@@ -17,12 +17,6 @@
17
17
  "phrase": "Ruby on Rails",
18
18
  "expected": "ROR"
19
19
  },
20
- {
21
- "description": "camelcase",
22
- "property": "abbreviate",
23
- "phrase": "HyperText Markup Language",
24
- "expected": "HTML"
25
- },
26
20
  {
27
21
  "description": "punctuation",
28
22
  "property": "abbreviate",
@@ -1,3 +1,5 @@
1
+ Convert a long phrase to its acronym.
2
+
1
3
  Techies love their TLA (Three Letter Acronyms)!
2
4
 
3
5
  Help generate some jargon by writing a program that converts a long name
@@ -1,3 +1,5 @@
1
+ Convert a number, represented as a sequence of digits in one base, to any other base.
2
+
1
3
  Implement general base conversion. Given a number in base **a**,
2
4
  represented as a sequence of digits, convert it to base **b**.
3
5
 
@@ -1,3 +1,5 @@
1
+ Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
2
+
1
3
  An allergy test produces a single numeric score which contains the
2
4
  information about all the allergies the person has (that they were
3
5
  tested for).
@@ -1,3 +1,5 @@
1
+ Write a function to solve alphametics puzzles.
2
+
1
3
  [Alphametics](https://en.wikipedia.org/wiki/Alphametics) is a puzzle where
2
4
  letters in words are replaced with numbers.
3
5
 
@@ -1,3 +1,5 @@
1
+ Given a word and a list of possible anagrams, select the correct sublist.
2
+
1
3
  Given `"listen"` and a list of candidates like `"enlists" "google"
2
4
  "inlets" "banana"` the program should return a list containing
3
5
  `"inlets"`.
@@ -1,3 +1,5 @@
1
+ Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
2
+
1
3
  The Atbash cipher is a simple substitution cipher that relies on
2
4
  transposing all the letters in the alphabet such that the resulting
3
5
  alphabet is backwards. The first letter is replaced with the last
@@ -1,3 +1,5 @@
1
+ Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!
2
+
1
3
  A bank account can be accessed in multiple ways. Clients can make
2
4
  deposits and withdrawals using the internet, mobile phones, etc. Shops
3
5
  can charge against the account.
@@ -1,3 +1,5 @@
1
+ Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
2
+
1
3
  Note that not all verses are identical.
2
4
 
3
5
  ```plain
@@ -1,3 +1,5 @@
1
+ Convert a binary number, represented as a string (e.g. '101010'), to its decimal equivalent using first principles.
2
+
1
3
  Implement binary to decimal conversion. Given a binary input
2
4
  string, your program should produce a decimal output. The
3
5
  program should handle invalid inputs.
@@ -1,3 +1,5 @@
1
+ Implement a binary search algorithm.
2
+
1
3
  Searching a sorted collection is a common task. A dictionary is a sorted
2
4
  list of word definitions. Given a word, one can find its definition. A
3
5
  telephone book is a sorted list of people's names, addresses, and
@@ -1,3 +1,5 @@
1
+ Insert and search for numbers in a binary tree.
2
+
1
3
  When we need to represent sorted data, an array does not make a good
2
4
  data structure.
3
5
 
@@ -1,3 +1,5 @@
1
+ Bob is a lackadaisical teenager. In conversation, his responses are very limited.
2
+
1
3
  Bob answers 'Sure.' if you ask him a question.
2
4
 
3
5
  He answers 'Whoa, chill out!' if you yell at him.
@@ -1,3 +1,5 @@
1
+ To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.
2
+
1
3
  To try and encourage more sales of the 5 different books
2
4
  they sell of a popular series, a bookshop has decided to
3
5
  offer discounts of multi-book purchases.
@@ -1,3 +1,5 @@
1
+ Score a bowling game.
2
+
1
3
  Bowling is game where players roll a heavy ball to knock down pins
2
4
  arranged in a triangle. Write code to keep track of the score
3
5
  of a game of bowling.
@@ -1,2 +1,4 @@
1
+ Make sure the brackets and braces all match.
2
+
1
3
  Ensure that all the brackets and braces are matched correctly,
2
4
  and nested correctly.
@@ -1,3 +1,5 @@
1
+ Correctly determine change to be given using the least number of coins.
2
+
1
3
  Correctly determine the fewest number of coins to be given to the user
2
4
  such that the sum of the coins' value would equal the correct amount
3
5
  of change.
@@ -1,3 +1,5 @@
1
+ A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.
2
+
1
3
  A circular buffer, cyclic buffer or ring buffer is a data structure that
2
4
  uses a single, fixed-size buffer as if it were connected end-to-end.
3
5
 
@@ -1,3 +1,5 @@
1
+ Implement a clock that handles times without dates.
2
+
1
3
  Create a clock that is independent of date.
2
4
 
3
5
  You should be able to add and subtract minutes to it.
@@ -1,3 +1,5 @@
1
+ Compute the result for a game of Hex / Polygon.
2
+
1
3
  The abstract boardgame known as
2
4
  [Hex](https://en.wikipedia.org/wiki/Hex_%28board_game%29) / Polygon /
3
5
  CON-TAC-TIX is quite simple in rules, though complex in practice. Two players
@@ -1,3 +1,5 @@
1
+ Design a test suite for a line/letter/character counter tool.
2
+
1
3
  **NOTE: This exercise has been deprecated.**
2
4
 
3
5
  Please see the discussion in https://github.com/exercism/x-common/issues/80
@@ -1,3 +1,5 @@
1
+ Implement the classic method for composing secret messages called a square code.
2
+
1
3
  Given an English text, output the encoded version of that text.
2
4
 
3
5
  First, the input is normalized: the spaces and punctuation are removed
@@ -1,3 +1,5 @@
1
+ Create a custom set type.
2
+
1
3
  Sometimes it is necessary to define a custom data structure of some
2
4
  type, like a set. In this exercise you will define your own set. How it
3
5
  works internally doesn't matter, as long as it behaves like a set of
@@ -1,3 +1,5 @@
1
+ Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.
2
+
1
3
  ## Diamond kata
2
4
 
3
5
  The diamond kata takes as its input a letter, and outputs it in a diamond
@@ -1,3 +1,5 @@
1
+ Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
2
+
1
3
  The square of the sum of the first ten natural numbers is
2
4
  (1 + 2 + ... + 10)² = 55² = 3025.
3
5
 
@@ -1,3 +1,5 @@
1
+ Diffie-Hellman key exchange.
2
+
1
3
  Alice and Bob use Diffie-Hellman key exchange to share secrets. They
2
4
  start with prime numbers, pick private keys, generate and share public
3
5
  keys, and then generate a shared secret key.
@@ -1,3 +1,5 @@
1
+ Make a chain of dominoes.
2
+
1
3
  Compute a way to order a given set of dominoes in such a way that they form a
2
4
  correct domino chain (the dots on one half of a stone match the dots on the
3
5
  neighbouring half of an adjacent stone) and that dots on the halfs of the stones
@@ -1,3 +1,5 @@
1
+ Write a Domain Specific Language similar to the Graphviz dot language.
2
+
1
3
  A [Domain Specific Language
2
4
  (DSL)](https://en.wikipedia.org/wiki/Domain-specific_language) is a
3
5
  small language optimized for a specific domain.
@@ -1,3 +1,5 @@
1
+ Implement various kinds of error handling and resource management.
2
+
1
3
  An important point of programming is how to handle errors and close
2
4
  resources even if errors occur.
3
5
 
@@ -1,3 +1,5 @@
1
+ We are going to do the `Transform` step of an Extract-Transform-Load.
2
+
1
3
  ### ETL
2
4
  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
3
5
  we're going to migrate this."
@@ -1,3 +1,5 @@
1
+ Take a nested list and return a single list with all values except nil/null.
2
+
1
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.
2
4
 
3
5
  For Example
@@ -1,3 +1,5 @@
1
+ Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.
2
+
1
3
  While you could copy/paste the lyrics,
2
4
  or read them from a file, this problem is much more
3
5
  interesting if you approach it algorithmically.
@@ -1,3 +1,5 @@
1
+ Implement an evaluator for a very simple subset of Forth.
2
+
1
3
  [Forth](https://en.wikipedia.org/wiki/Forth_%28programming_language%29)
2
4
  is a stack-based programming language. Implement a very basic evaluator
3
5
  for a small subset of Forth.
@@ -1 +1,3 @@
1
+ Calculate the moment when someone has lived for 10^9 seconds.
2
+
1
3
  A gigasecond is 10^9 (1,000,000,000) seconds.
@@ -1,3 +1,5 @@
1
+ Count the scored points on a Go board.
2
+
1
3
  In the game of go (also known as baduk, igo, cờ vây and wéiqí) points
2
4
  are gained by completely encircling empty intersections with your
3
5
  stones. The encircled intersections of a player are known as its
@@ -1,3 +1,5 @@
1
+ Given students' names along with the grade that they are in, create a roster for the school.
2
+
1
3
  In the end, you should be able to:
2
4
 
3
5
  - Add a student's name to the roster for a grade
@@ -1,3 +1,5 @@
1
+ Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
2
+
1
3
  There once was a wise servant who saved the life of a prince. The king
2
4
  promised to pay whatever the servant could dream up. Knowing that the
3
5
  king loved chess, the servant told the king he would like to have grains
@@ -1,3 +1,5 @@
1
+ Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line.
2
+
1
3
  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
2
4
  that match a user-provided search query (known as the *pattern*).
3
5
 
@@ -1,3 +1,5 @@
1
+ Calculate the Hamming difference between two DNA strands.
2
+
1
3
  A mutation is simply a mistake that occurs during the creation or
2
4
  copying of a nucleic acid, in particular DNA. Because nucleic acids are
3
5
  vital to cellular functions, mutations tend to cause a ripple effect
@@ -1,3 +1,5 @@
1
+ Implement the logic of the hangman game using functional reactive programming.
2
+
1
3
  [Hangman][] is a simple word guessing game.
2
4
 
3
5
  [Functional Reactive Programming][frp] is a way to write interactive
@@ -1,3 +1,5 @@
1
+ The classical introductory exercise. Just say "Hello, World!".
2
+
1
3
  ["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
2
4
  the traditional first program for beginning programming in a new language
3
5
  or environment.
@@ -1,3 +1,5 @@
1
+ Convert a hexadecimal number, represented as a string (e.g. "10af8c"), to its decimal equivalent using first principles (i.e. no, you may not use built-in or external libraries to accomplish the conversion).
2
+
1
3
  On the web we use hexadecimal to represent colors, e.g. green: 008000,
2
4
  teal: 008080, navy: 000080).
3
5
 
@@ -1,3 +1,5 @@
1
+ Output the nursery rhyme 'This is the House that Jack Built'.
2
+
1
3
  > [The] process of placing a phrase of clause within another phrase of
2
4
  > clause is called embedding. It is through the processes of recursion
3
5
  > and embedding that we are able to take a finite number of forms (words
@@ -1,3 +1,5 @@
1
+ Determine if a word or phrase is an isogram.
2
+
1
3
  An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter.
2
4
 
3
5
  Examples of isograms:
@@ -1,3 +1,5 @@
1
+ Given a diagram, determine which plants each child in the kindergarten class is responsible for.
2
+
1
3
  The kindergarten class is learning about growing plants. The teachers
2
4
  thought it would be a good idea to give them actual seeds, plant them in
3
5
  actual dirt, and grow actual plants.
@@ -1,3 +1,5 @@
1
+ Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
2
+
1
3
  For example, for the input `'1027839564'`, the largest product for a
2
4
  series of 3 digits is 270 (9 * 5 * 6), and the largest product for a
3
5
  series of 5 digits is 7560 (7 * 8 * 3 * 9 * 5).
@@ -1,3 +1,5 @@
1
+ Given a year, report if it is a leap year.
2
+
1
3
  The tricky thing here is that a leap year in the Gregorian calendar occurs:
2
4
 
3
5
  ```plain
@@ -1,3 +1,5 @@
1
+ Refactor a ledger printer.
2
+
1
3
  The ledger exercise is a refactoring exercise. There is code that prints a
2
4
  nicely formatted ledger, given a locale (American or Dutch) and a currency (US
3
5
  dollar or euro). The code however is rather badly written, though (somewhat
@@ -1,3 +1,5 @@
1
+ Use lenses to update nested records (specific to languages with immutable data).
2
+
1
3
  Updating fields of nested records is kind of annoying in Haskell. One solution
2
4
  is to use [lenses](https://wiki.haskell.org/Lens). Implement several record
3
5
  accessing functions using lenses, you may use any library you want. The test
@@ -1,3 +1,5 @@
1
+ Implement a doubly linked list.
2
+
1
3
  Like an array, a linked list is a simple linear data structure. Several
2
4
  common data types can be implemented using linked lists, like queues,
3
5
  stacks, and associative arrays.
@@ -1,3 +1,5 @@
1
+ Implement basic list operations.
2
+
1
3
  In functional languages list operations like `length`, `map`, and
2
4
  `reduce` are very common. Implement a series of basic list operations,
3
5
  without using existing functions.
@@ -1,3 +1,5 @@
1
+ Given a number determine whether or not it is valid per the Luhn formula.
2
+
1
3
  The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is
2
4
  a simple checksum formula used to validate a variety of identification
3
5
  numbers, such as credit card numbers and Canadian Social Insurance
@@ -1,3 +1,5 @@
1
+ Refactor a Markdown parser.
2
+
1
3
  The markdown exercise is a refactoring exercise. There is code that parses a
2
4
  given string with [Markdown
3
5
  syntax](https://guides.github.com/features/mastering-markdown/) and returns the
@@ -1,3 +1,5 @@
1
+ Given a string representing a matrix of numbers, return the rows and columns of that matrix.
2
+
1
3
  So given a string with embedded newlines like:
2
4
 
3
5
  > 9 8 7
@@ -1,3 +1,5 @@
1
+ Calculate the date of meetups.
2
+
1
3
  Typically meetups happen on the same day of the week. In this exercise, you will take
2
4
  a description of a meetup date, and return the actual meetup date.
3
5
 
@@ -1,3 +1,5 @@
1
+ Add the numbers to a minesweeper board.
2
+
1
3
  Minesweeper is a popular game where the user has to find the mines using
2
4
  numeric hints that indicate how many mines are directly adjacent
3
5
  (horizontally, vertically, diagonally) to a square.
@@ -1,3 +1,5 @@
1
+ Given a number n, determine what the nth prime is.
2
+
1
3
  By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that
2
4
  the 6th prime is 13.
3
5
 
@@ -1,3 +1,5 @@
1
+ Write a function that returns the name of an amino acid a particular codon, possibly using shorthand, encodes for.
2
+
1
3
  In DNA sequences of 3 nucleotides, called codons, encode for amino acids. Often
2
4
  several codons encode for the same amino acid. The International Union of Pure
3
5
  and Applied Chemistry developed a shorthand system for designating groups of
@@ -1,3 +1,5 @@
1
+ Given a DNA string, compute how many times each nucleotide occurs in the string.
2
+
1
3
  DNA is represented by an alphabet of the following symbols: 'A', 'C',
2
4
  'G', and 'T'.
3
5
 
@@ -1,3 +1,5 @@
1
+ Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.
2
+
1
3
  # Step One
2
4
 
3
5
  To begin with, convert a simple binary font to a string containing 0 or 1.
@@ -1,3 +1,5 @@
1
+ Convert a octal number, represented as a string (e.g. '1735263'), to its decimal equivalent using first principles (i.e. no, you may not use built-in or external libraries to accomplish the conversion).
2
+
1
3
  Implement octal to decimal conversion. Given an octal input
2
4
  string, your program should produce a decimal output.
3
5
 
@@ -1,3 +1,5 @@
1
+ Report network IO statistics.
2
+
1
3
  You are writing a [PaaS][], and you need a way to bill customers based
2
4
  on network and filesystem usage.
3
5
 
@@ -1,3 +1,5 @@
1
+ Detect palindrome products in a given range.
2
+
1
3
  A palindromic number is a number that remains the same when its digits are
2
4
  reversed. For example, `121` is a palindromic number but `112` is not.
3
5
 
@@ -1,3 +1,5 @@
1
+ Count the frequency of letters in texts using parallel computation.
2
+
1
3
  Parallelism is about doing things in parallel that can also be done
2
4
  sequentially. A common example is counting the frequency of letters.
3
5
  Create a function that returns the total frequency of each letter in a
@@ -1,3 +1,5 @@
1
+ Compute Pascal's triangle up to a given number of rows.
2
+
1
3
  In Pascal's Triangle each number is computed by adding the numbers to
2
4
  the right and left of the current position in the previous row.
3
5
 
@@ -1,3 +1,5 @@
1
+ Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
2
+
1
3
  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
2
4
 
3
5
  - **Perfect**: aliquot sum = number
@@ -1,3 +1,5 @@
1
+ Clean up user-entered phone numbers so that they can be sent SMS messages.
2
+
1
3
  The **North American Numbering Plan (NANP)** is a telephone numbering system used by many countries in North America like the United States, Canada or Bermuda. All NANP-countries share the same international country code `1`.
2
4
 
3
5
  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*.
@@ -1,3 +1,5 @@
1
+ Implement a program that translates from English to Pig Latin.
2
+
1
3
  Pig Latin is a made-up children's language that's intended to be
2
4
  confusing. It obeys a few simple rules (below), but when it's spoken
3
5
  quickly it's really difficult for non-children (and non-native speakers)
@@ -1,3 +1,5 @@
1
+ Calculate the Hamming difference between two DNA strands.
2
+
1
3
  A mutation is simply a mistake that occurs during the creation or
2
4
  copying of a nucleic acid, in particular DNA. Because nucleic acids are
3
5
  vital to cellular functions, mutations tend to cause a ripple effect