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
@@ -0,0 +1,317 @@
1
+ {
2
+ "exercise": "poker",
3
+ "version": "1.0.0",
4
+ "cases": [
5
+ {
6
+ "description": "single hand always wins",
7
+ "property": "bestHands",
8
+ "input": [
9
+ "4S 5S 7H 8D JC"
10
+ ],
11
+ "expected": [
12
+ "4S 5S 7H 8D JC"
13
+ ]
14
+ },
15
+ {
16
+ "description": "highest card out of all hands wins",
17
+ "property": "bestHands",
18
+ "input": [
19
+ "4D 5S 6S 8D 3C",
20
+ "2S 4C 7S 9H 10H",
21
+ "3S 4S 5D 6H JH"
22
+ ],
23
+ "expected": [
24
+ "3S 4S 5D 6H JH"
25
+ ]
26
+ },
27
+ {
28
+ "description": "a tie has multiple winners",
29
+ "property": "bestHands",
30
+ "input": [
31
+ "4D 5S 6S 8D 3C",
32
+ "2S 4C 7S 9H 10H",
33
+ "3S 4S 5D 6H JH",
34
+ "3H 4H 5C 6C JD"
35
+ ],
36
+ "expected": [
37
+ "3S 4S 5D 6H JH",
38
+ "3H 4H 5C 6C JD"
39
+ ]
40
+ },
41
+ {
42
+ "description": "multiple hands with the same high cards, tie compares next highest ranked, down to last card",
43
+ "property": "bestHands",
44
+ "input": [
45
+ "3S 5H 6S 8D 7H",
46
+ "2S 5D 6D 8C 7S"
47
+ ],
48
+ "expected": [
49
+ "3S 5H 6S 8D 7H"
50
+ ]
51
+ },
52
+ {
53
+ "description": "one pair beats high card",
54
+ "property": "bestHands",
55
+ "input": [
56
+ "4S 5H 6C 8D KH",
57
+ "2S 4H 6S 4D JH"
58
+ ],
59
+ "expected": [
60
+ "2S 4H 6S 4D JH"
61
+ ]
62
+ },
63
+ {
64
+ "description": "highest pair wins",
65
+ "property": "bestHands",
66
+ "input": [
67
+ "4S 2H 6S 2D JH",
68
+ "2S 4H 6C 4D JD"
69
+ ],
70
+ "expected": [
71
+ "2S 4H 6C 4D JD"
72
+ ]
73
+ },
74
+ {
75
+ "description": "two pairs beats one pair",
76
+ "property": "bestHands",
77
+ "input": [
78
+ "2S 8H 6S 8D JH",
79
+ "4S 5H 4C 8C 5C"
80
+ ],
81
+ "expected": [
82
+ "4S 5H 4C 8C 5C"
83
+ ]
84
+ },
85
+ {
86
+ "description": "both hands have two pairs, highest ranked pair wins",
87
+ "property": "bestHands",
88
+ "input": [
89
+ "2S 8H 2D 8D 3H",
90
+ "4S 5H 4C 8S 5D"
91
+ ],
92
+ "expected": [
93
+ "2S 8H 2D 8D 3H"
94
+ ]
95
+ },
96
+ {
97
+ "description": "both hands have two pairs, with the same highest ranked pair, tie goes to low pair",
98
+ "property": "bestHands",
99
+ "input": [
100
+ "2S QS 2C QD JH",
101
+ "JD QH JS 8D QC"
102
+ ],
103
+ "expected": [
104
+ "JD QH JS 8D QC"
105
+ ]
106
+ },
107
+ {
108
+ "description": "both hands have two identically ranked pairs, tie goes to remaining card (kicker)",
109
+ "property": "bestHands",
110
+ "input": [
111
+ "JD QH JS 8D QC",
112
+ "JS QS JC 2D QD"
113
+ ],
114
+ "expected": [
115
+ "JD QH JS 8D QC"
116
+ ]
117
+ },
118
+ {
119
+ "description": "three of a kind beats two pair",
120
+ "property": "bestHands",
121
+ "input": [
122
+ "2S 8H 2H 8D JH",
123
+ "4S 5H 4C 8S 4H"
124
+ ],
125
+ "expected": [
126
+ "4S 5H 4C 8S 4H"
127
+ ]
128
+ },
129
+ {
130
+ "description": "both hands have three of a kind, tie goes to highest ranked triplet",
131
+ "property": "bestHands",
132
+ "input": [
133
+ "2S 2H 2C 8D JH",
134
+ "4S AH AS 8C AD"
135
+ ],
136
+ "expected": [
137
+ "4S AH AS 8C AD"
138
+ ]
139
+ },
140
+ {
141
+ "description": "with multiple decks, two players can have same three of a kind, ties go to highest remaining cards",
142
+ "property": "bestHands",
143
+ "input": [
144
+ "4S AH AS 7C AD",
145
+ "4S AH AS 8C AD"
146
+ ],
147
+ "expected": [
148
+ "4S AH AS 8C AD"
149
+ ]
150
+ },
151
+ {
152
+ "description": "a straight beats three of a kind",
153
+ "property": "bestHands",
154
+ "input": [
155
+ "4S 5H 4C 8D 4H",
156
+ "3S 4D 2S 6D 5C"
157
+ ],
158
+ "expected": [
159
+ "3S 4D 2S 6D 5C"
160
+ ]
161
+ },
162
+ {
163
+ "description": "aces can end a straight (10 J Q K A)",
164
+ "property": "bestHands",
165
+ "input": [
166
+ "4S 5H 4C 8D 4H",
167
+ "10D JH QS KD AC"
168
+ ],
169
+ "expected": [
170
+ "10D JH QS KD AC"
171
+ ]
172
+ },
173
+ {
174
+ "description": "aces can start a straight (A 2 3 4 5)",
175
+ "property": "bestHands",
176
+ "input": [
177
+ "4S 5H 4C 8D 4H",
178
+ "4D AH 3S 2D 5C"
179
+ ],
180
+ "expected": [
181
+ "4D AH 3S 2D 5C"
182
+ ]
183
+ },
184
+ {
185
+ "description": "both hands with a straight, tie goes to highest ranked card",
186
+ "property": "bestHands",
187
+ "input": [
188
+ "4S 6C 7S 8D 5H",
189
+ "5S 7H 8S 9D 6H"
190
+ ],
191
+ "expected": [
192
+ "5S 7H 8S 9D 6H"
193
+ ]
194
+ },
195
+ {
196
+ "description": "even though an ace is usually high, a 5-high straight is the lowest-scoring straight",
197
+ "property": "bestHands",
198
+ "input": [
199
+ "2H 3C 4D 5D 6H",
200
+ "4S AH 3S 2D 5H"
201
+ ],
202
+ "expected": [
203
+ "2H 3C 4D 5D 6H"
204
+ ]
205
+ },
206
+ {
207
+ "description": "flush beats a straight",
208
+ "property": "bestHands",
209
+ "input": [
210
+ "4C 6H 7D 8D 5H",
211
+ "2S 4S 5S 6S 7S"
212
+ ],
213
+ "expected": [
214
+ "2S 4S 5S 6S 7S"
215
+ ]
216
+ },
217
+ {
218
+ "description": "both hands have a flush, tie goes to high card, down to the last one if necessary",
219
+ "property": "bestHands",
220
+ "input": [
221
+ "4H 7H 8H 9H 6H",
222
+ "2S 4S 5S 6S 7S"
223
+ ],
224
+ "expected": [
225
+ "4H 7H 8H 9H 6H"
226
+ ]
227
+ },
228
+ {
229
+ "description": "full house beats a flush",
230
+ "property": "bestHands",
231
+ "input": [
232
+ "3H 6H 7H 8H 5H",
233
+ "4S 5H 4C 5D 4H"
234
+ ],
235
+ "expected": [
236
+ "4S 5H 4C 5D 4H"
237
+ ]
238
+ },
239
+ {
240
+ "description": "both hands have a full house, tie goes to highest-ranked triplet",
241
+ "property": "bestHands",
242
+ "input": [
243
+ "4H 4S 4D 9S 9D",
244
+ "5H 5S 5D 8S 8D"
245
+ ],
246
+ "expected": [
247
+ "5H 5S 5D 8S 8D"
248
+ ]
249
+ },
250
+ {
251
+ "description": "with multiple decks, both hands have a full house with the same triplet, tie goes to the pair",
252
+ "property": "bestHands",
253
+ "input": [
254
+ "5H 5S 5D 9S 9D",
255
+ "5H 5S 5D 8S 8D"
256
+ ],
257
+ "expected": [
258
+ "5H 5S 5D 9S 9D"
259
+ ]
260
+ },
261
+ {
262
+ "description": "four of a kind beats a full house",
263
+ "property": "bestHands",
264
+ "input": [
265
+ "4S 5H 4D 5D 4H",
266
+ "3S 3H 2S 3D 3C"
267
+ ],
268
+ "expected": [
269
+ "3S 3H 2S 3D 3C"
270
+ ]
271
+ },
272
+ {
273
+ "description": "both hands have four of a kind, tie goes to high quad",
274
+ "property": "bestHands",
275
+ "input": [
276
+ "2S 2H 2C 8D 2D",
277
+ "4S 5H 5S 5D 5C"
278
+ ],
279
+ "expected": [
280
+ "4S 5H 5S 5D 5C"
281
+ ]
282
+ },
283
+ {
284
+ "description": "with multiple decks, both hands with identical four of a kind, tie determined by kicker" ,
285
+ "property": "bestHands",
286
+ "input": [
287
+ "3S 3H 2S 3D 3C",
288
+ "3S 3H 4S 3D 3C"
289
+ ],
290
+ "expected": [
291
+ "3S 3H 4S 3D 3C"
292
+ ]
293
+ },
294
+ {
295
+ "description": "straight flush beats four of a kind",
296
+ "property": "bestHands",
297
+ "input": [
298
+ "4S 5H 5S 5D 5C",
299
+ "7S 8S 9S 6S 10S"
300
+ ],
301
+ "expected": [
302
+ "7S 8S 9S 6S 10S"
303
+ ]
304
+ },
305
+ {
306
+ "description": "both hands have straight flush, tie goes to highest-ranked card",
307
+ "property": "bestHands",
308
+ "input": [
309
+ "4H 6H 7H 8H 5H",
310
+ "5S 7S 8S 9S 6S"
311
+ ],
312
+ "expected": [
313
+ "5S 7S 8S 9S 6S"
314
+ ]
315
+ }
316
+ ]
317
+ }
@@ -1,3 +1,5 @@
1
+ Pick the best hand(s) from a list of poker hands.
2
+
1
3
  Write an algorithm to pick the best poker hand(s) from a list.
2
4
 
3
5
  See [wikipedia](https://en.wikipedia.org/wiki/List_of_poker_hands) for an
@@ -1,3 +1,5 @@
1
+ Reparent a graph on a selected node.
2
+
1
3
  # Tree Reparenting
2
4
 
3
5
  This exercise is all about re-orientating a graph to see things from a different
@@ -1,3 +1,5 @@
1
+ Compute the prime factors of a given natural number.
2
+
1
3
  A prime number is only evenly divisible by itself and 1.
2
4
 
3
5
  Note that 1 is not a prime number.
@@ -1,3 +1,5 @@
1
+ Translate RNA sequences into proteins.
2
+
1
3
  Let's translate RNA sequences into proteins. [general ref](http://en.wikipedia.org/wiki/Translation_(biology))
2
4
 
3
5
  RNA can be broken into three nucleotide sequences called codons, and then translated to a polypeptide like so:
@@ -1,3 +1,5 @@
1
+ For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output the full text of this proverbial rhyme.
2
+
1
3
  For want of a nail the shoe was lost.
2
4
  For want of a shoe the horse was lost.
3
5
  For want of a horse the rider was lost.
@@ -1,3 +1,5 @@
1
+ There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product a * b * c.
2
+
1
3
  A Pythagorean triplet is a set of three natural numbers, {a, b, c}, for
2
4
  which,
3
5
 
@@ -1,3 +1,5 @@
1
+ Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.
2
+
1
3
  In the game of chess, a queen can attack pieces which are on the same
2
4
  row, column, or diagonal.
3
5
 
@@ -1,3 +1,5 @@
1
+ Implement encoding and decoding for the rail fence cipher.
2
+
1
3
  The Rail Fence cipher is a form of transposition cipher that gets its name from
2
4
  the way in which it's encoded. It was already used by the ancient Greeks.
3
5
 
@@ -1,3 +1,5 @@
1
+ Convert a number to a string, the contents of which depend on the number's factors.
2
+
1
3
  - If the number has 3 as a factor, output 'Pling'.
2
4
  - If the number has 5 as a factor, output 'Plang'.
3
5
  - If the number has 7 as a factor, output 'Plong'.
@@ -1,3 +1,5 @@
1
+ Implement a basic reactive system.
2
+
1
3
  Reactive programming is a programming paradigm that focuses on how values
2
4
  are computed in terms of each other to allow a change to one value to
3
5
  automatically propagate to other values, like in a spreadsheet.
@@ -1,3 +1,5 @@
1
+ Count the rectangles in an ASCII diagram.
2
+
1
3
  Create a program to count the rectangles in an ASCII diagram like the one below.
2
4
 
3
5
  ```
@@ -1,3 +1,5 @@
1
+ Given a DNA strand, return its RNA complement (per RNA transcription).
2
+
1
3
  Both DNA and RNA strands are a sequence of nucleotides.
2
4
 
3
5
  The four nucleotides found in DNA are adenine (**A**), cytosine (**C**),
@@ -1,3 +1,5 @@
1
+ Manage robot factory settings.
2
+
1
3
  When robots come off the factory floor, they have no name.
2
4
 
3
5
  The first time you boot them up, a random name is generated in the format
@@ -1,3 +1,5 @@
1
+ Write a robot simulator.
2
+
1
3
  A robot factory's test facility needs a program to verify robot movements.
2
4
 
3
5
  The robots have three possible movements:
@@ -1,3 +1,5 @@
1
+ Write a function to convert from normal numbers to Roman Numerals.
2
+
1
3
  The Romans were a clever bunch. They conquered most of Europe and ruled
2
4
  it for hundreds of years. They invented concrete and straight roads and
3
5
  even bikinis. One thing they never discovered though was the number
@@ -1,3 +1,5 @@
1
+ Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
2
+
1
3
  # Rotational Cipher
2
4
 
3
5
  Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
@@ -1,3 +1,5 @@
1
+ Implement run-length encoding and decoding.
2
+
1
3
  Run-length encoding (RLE) is a simple form of data compression, where runs
2
4
  (consecutive data elements) are replaced by just one data value and count.
3
5
 
@@ -1,3 +1,5 @@
1
+ Detect saddle points in a matrix.
2
+
1
3
  So say you have a matrix like so:
2
4
 
3
5
  ```plain
@@ -1,3 +1,5 @@
1
+ Given a number from 0 to 999,999,999,999, spell out that number in English.
2
+
1
3
  ## Step 1
2
4
 
3
5
  Handle the basic case of 0 through 99.
@@ -1,3 +1,5 @@
1
+ Generate musical scales, given a starting note and a set of intervals.
2
+
1
3
  Given a tonic, or starting note, and a set of intervals, generate
2
4
  the musical scale starting with the tonic and following the
3
5
  specified interval pattern.
@@ -1,3 +1,5 @@
1
+ Given a word, compute the scrabble score for that word.
2
+
1
3
  ## Letter Values
2
4
 
3
5
  You'll need these:
@@ -1,3 +1,5 @@
1
+ Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
2
+
1
3
  > There are 10 types of people in the world: Those who understand
2
4
  > binary, and those who don't.
3
5
 
@@ -1,3 +1,5 @@
1
+ Given a string of digits, output all the contiguous substrings of length `n` in that string.
2
+
1
3
  For example, the string "49142" has the following 3-digit series:
2
4
 
3
5
  - 491
@@ -1,3 +1,5 @@
1
+ Parsing a Smart Game Format string.
2
+
1
3
  [SGF](https://en.wikipedia.org/wiki/Smart_Game_Format) is a standard format for
2
4
  storing board game files, in particular go.
3
5
 
@@ -1,3 +1,5 @@
1
+ Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
2
+
1
3
  The Sieve of Eratosthenes is a simple, ancient algorithm for finding all
2
4
  prime numbers up to any given limit. It does so by iteratively marking as
3
5
  composite (i.e. not prime) the multiples of each prime,
@@ -1,3 +1,5 @@
1
+ Implement a simple shift cipher like Caesar and a more secure substitution cipher.
2
+
1
3
  ## Step 1
2
4
 
3
5
  "If he had anything confidential to say, he wrote it in cipher, that is,
@@ -1,3 +1,5 @@
1
+ Write a simple linked list implementation that uses Elements and a List.
2
+
1
3
  The linked list is a fundamental data structure in computer science,
2
4
  often used in the implementation of other data structures. They're
3
5
  pervasive in functional programming languages, such as Clojure, Erlang,
@@ -1,3 +1,5 @@
1
+ Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
2
+
1
3
  Given an age in seconds, calculate how old someone would be on:
2
4
 
3
5
  - Earth: orbital period 365.25 Earth days, or 31557600 seconds
@@ -1,3 +1,5 @@
1
+ Implement the `keep` and `discard` operation on collections. Given a collection and a predicate on the collection's elements, `keep` returns a new collection containing those elements where the predicate is true, while `discard` returns a new collection containing those elements where the predicate is false.
2
+
1
3
  Write two functions that each take a function and a list. One of them will
2
4
  return the list of items for which the passed in function is true, and the
3
5
  other will return the items for which it is false.
@@ -1,3 +1,5 @@
1
+ Write a function to determine if a list is a sublist of another list.
2
+
1
3
  Write a function that given two lists determines if the first list is
2
4
  contained within the second list, if the second list is contained within
3
5
  the first list, if both lists are contained within each other or if none
@@ -1,3 +1,5 @@
1
+ Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
2
+
1
3
  If we list all the natural numbers up to but not including 20 that are
2
4
  multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18.
3
5
 
@@ -1,3 +1,5 @@
1
+ Take input text and output it transposed.
2
+
1
3
  Given an input text output it transposed.
2
4
 
3
5
  Roughly explained, the transpose of a matrix:
@@ -1,3 +1,5 @@
1
+ Refactor a tree building algorithm.
2
+
1
3
  Some web-forums have a tree layout, so posts are presented as a tree. However
2
4
  the posts are typically stored in a database as an unsorted set of records. Thus
3
5
  when presenting the posts to the user the tree structure has to be
@@ -1,3 +1,5 @@
1
+ Determine if a triangle is equilateral, isosceles, or scalene.
2
+
1
3
  An _equilateral_ triangle has all three sides the same length.<br/>
2
4
  An _isosceles_ triangle has at least two sides the same length. (It is sometimes
3
5
  specified as having exactly two sides the same length, but for the purposes of
@@ -1,3 +1,5 @@
1
+ Convert a trinary number, represented as a string (e.g. '102012'), to its decimal equivalent using first principles.
2
+
1
3
  The program should consider strings specifying an invalid trinary as the
2
4
  value 0.
3
5
 
@@ -1,3 +1,5 @@
1
+ Output the lyrics to 'The Twelve Days of Christmas'.
2
+
1
3
  ```ruby
2
4
  On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.
3
5
 
@@ -1,3 +1,5 @@
1
+ Given two buckets of different size, demonstrate how to measure an exact number of liters.
2
+
1
3
  Given two buckets of different size, demonstrate how to measure an exact number of liters by strategically transferring liters of fluid between the buckets.
2
4
 
3
5
  Since this mathematical problem is fairly subject to interpretation / individual approach, the tests have been written specifically to expect one overarching solution.
@@ -1,3 +1,5 @@
1
+ Implement variable length quantity encoding and decoding.
2
+
1
3
  The goal of this exercise is to implement [VLQ](https://en.wikipedia.org/wiki/Variable-length_quantity) encoding/decoding.
2
4
 
3
5
  In short, the goal of this encoding is to encode integer values in a way that would save bytes.
@@ -1,3 +1,5 @@
1
+ Given a phrase, count the occurrences of each word in that phrase.
2
+
1
3
  For example for the input `"olly olly in come free"`
2
4
 
3
5
  ```plain
@@ -1,3 +1,5 @@
1
+ Create a program to solve a word search puzzle.
2
+
1
3
  In word search puzzles you get a square of letters and have to find specific
2
4
  words in them.
3
5
 
@@ -1,3 +1,5 @@
1
+ Parse and evaluate simple math word problems returning the answer as an integer.
2
+
1
3
 
2
4
  ## Iteration 1 — Addition
3
5
 
@@ -1,3 +1,5 @@
1
+ Solve the zebra puzzle.
2
+
1
3
  1. There are five houses.
2
4
  2. The Englishman lives in the red house.
3
5
  3. The Spaniard owns the dog.
@@ -1,3 +1,5 @@
1
+ Creating a zipper for a binary tree.
2
+
1
3
  [Zippers](https://en.wikipedia.org/wiki/Zipper_%28data_structure%29) are
2
4
  a way purely functional of navigating within a data structure and
3
5
  manipulating it. They essentially contain a data structure and a
File without changes