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.
- checksums.yaml +4 -4
- data/common/bin/transfer_blurb_to_description.rb +56 -0
- data/common/exercises/accumulate/description.md +2 -0
- data/common/exercises/acronym/canonical-data.json +1 -7
- data/common/exercises/acronym/description.md +2 -0
- data/common/exercises/all-your-base/description.md +2 -0
- data/common/exercises/allergies/description.md +2 -0
- data/common/exercises/alphametics/description.md +2 -0
- data/common/exercises/anagram/description.md +2 -0
- data/common/exercises/atbash-cipher/description.md +2 -0
- data/common/exercises/bank-account/description.md +2 -0
- data/common/exercises/beer-song/description.md +2 -0
- data/common/exercises/binary/description.md +2 -0
- data/common/exercises/binary-search/description.md +2 -0
- data/common/exercises/binary-search-tree/description.md +2 -0
- data/common/exercises/bob/description.md +2 -0
- data/common/exercises/book-store/description.md +2 -0
- data/common/exercises/bowling/description.md +2 -0
- data/common/exercises/bracket-push/description.md +2 -0
- data/common/exercises/change/description.md +2 -0
- data/common/exercises/circular-buffer/description.md +2 -0
- data/common/exercises/clock/description.md +2 -0
- data/common/exercises/connect/description.md +2 -0
- data/common/exercises/counter/description.md +2 -0
- data/common/exercises/crypto-square/description.md +2 -0
- data/common/exercises/custom-set/description.md +2 -0
- data/common/exercises/diamond/description.md +2 -0
- data/common/exercises/difference-of-squares/description.md +2 -0
- data/common/exercises/diffie-hellman/description.md +2 -0
- data/common/exercises/dominoes/description.md +2 -0
- data/common/exercises/dot-dsl/description.md +2 -0
- data/common/exercises/error-handling/description.md +2 -0
- data/common/exercises/etl/description.md +2 -0
- data/common/exercises/flatten-array/description.md +2 -0
- data/common/exercises/food-chain/description.md +2 -0
- data/common/exercises/forth/description.md +2 -0
- data/common/exercises/gigasecond/description.md +2 -0
- data/common/exercises/go-counting/description.md +2 -0
- data/common/exercises/grade-school/description.md +2 -0
- data/common/exercises/grains/description.md +2 -0
- data/common/exercises/grep/description.md +2 -0
- data/common/exercises/hamming/description.md +2 -0
- data/common/exercises/hangman/description.md +2 -0
- data/common/exercises/hello-world/description.md +2 -0
- data/common/exercises/hexadecimal/description.md +2 -0
- data/common/exercises/house/description.md +2 -0
- data/common/exercises/isogram/description.md +2 -0
- data/common/exercises/kindergarten-garden/description.md +2 -0
- data/common/exercises/largest-series-product/description.md +2 -0
- data/common/exercises/leap/description.md +2 -0
- data/common/exercises/ledger/description.md +2 -0
- data/common/exercises/lens-person/description.md +2 -0
- data/common/exercises/linked-list/description.md +2 -0
- data/common/exercises/list-ops/description.md +2 -0
- data/common/exercises/luhn/description.md +2 -0
- data/common/exercises/markdown/description.md +2 -0
- data/common/exercises/matrix/description.md +2 -0
- data/common/exercises/meetup/description.md +2 -0
- data/common/exercises/minesweeper/description.md +2 -0
- data/common/exercises/nth-prime/description.md +2 -0
- data/common/exercises/nucleotide-codons/description.md +2 -0
- data/common/exercises/nucleotide-count/description.md +2 -0
- data/common/exercises/ocr-numbers/description.md +2 -0
- data/common/exercises/octal/description.md +2 -0
- data/common/exercises/paasio/description.md +2 -0
- data/common/exercises/palindrome-products/description.md +2 -0
- data/common/exercises/parallel-letter-frequency/description.md +2 -0
- data/common/exercises/pascals-triangle/description.md +2 -0
- data/common/exercises/perfect-numbers/description.md +2 -0
- data/common/exercises/phone-number/description.md +2 -0
- data/common/exercises/pig-latin/description.md +2 -0
- data/common/exercises/point-mutations/description.md +2 -0
- data/common/exercises/poker/canonical-data.json +317 -0
- data/common/exercises/poker/description.md +2 -0
- data/common/exercises/pov/description.md +2 -0
- data/common/exercises/prime-factors/description.md +2 -0
- data/common/exercises/protein-translation/description.md +2 -0
- data/common/exercises/proverb/description.md +2 -0
- data/common/exercises/pythagorean-triplet/description.md +2 -0
- data/common/exercises/queen-attack/description.md +2 -0
- data/common/exercises/rail-fence-cipher/description.md +2 -0
- data/common/exercises/raindrops/description.md +2 -0
- data/common/exercises/react/description.md +2 -0
- data/common/exercises/rectangles/description.md +2 -0
- data/common/exercises/rna-transcription/description.md +2 -0
- data/common/exercises/robot-name/description.md +2 -0
- data/common/exercises/robot-simulator/description.md +2 -0
- data/common/exercises/roman-numerals/description.md +2 -0
- data/common/exercises/rotational-cipher/description.md +2 -0
- data/common/exercises/run-length-encoding/description.md +2 -0
- data/common/exercises/saddle-points/description.md +2 -0
- data/common/exercises/say/description.md +2 -0
- data/common/exercises/scale-generator/description.md +2 -0
- data/common/exercises/scrabble-score/description.md +2 -0
- data/common/exercises/secret-handshake/description.md +2 -0
- data/common/exercises/series/description.md +2 -0
- data/common/exercises/sgf-parsing/description.md +2 -0
- data/common/exercises/sieve/description.md +2 -0
- data/common/exercises/simple-cipher/description.md +2 -0
- data/common/exercises/simple-linked-list/description.md +2 -0
- data/common/exercises/space-age/description.md +2 -0
- data/common/exercises/strain/description.md +2 -0
- data/common/exercises/sublist/description.md +2 -0
- data/common/exercises/sum-of-multiples/description.md +2 -0
- data/common/exercises/transpose/description.md +2 -0
- data/common/exercises/tree-building/description.md +2 -0
- data/common/exercises/triangle/description.md +2 -0
- data/common/exercises/trinary/description.md +2 -0
- data/common/exercises/twelve-days/description.md +2 -0
- data/common/exercises/two-bucket/description.md +2 -0
- data/common/exercises/variable-length-quantity/description.md +2 -0
- data/common/exercises/word-count/description.md +2 -0
- data/common/exercises/word-search/description.md +2 -0
- data/common/exercises/wordy/description.md +2 -0
- data/common/exercises/zebra-puzzle/description.md +2 -0
- data/common/exercises/zipper/description.md +2 -0
- data/fixtures/tracks/fake/{hello-world → exercises/hello-world}/example.ext +0 -0
- data/fixtures/tracks/fake/{hello-world → exercises/hello-world}/hello_test.ext +0 -0
- data/fixtures/tracks/fake/{hello-world → exercises/hello-world}/world_test.ext +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/.dot +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/Fakefile +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/HINTS.md +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/example.ext +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/one_test.ext +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/sub/src/ExampleFile.ext +0 -0
- data/fixtures/tracks/fake/{one → exercises/one}/sub/src/stubfile.ext +0 -0
- data/fixtures/tracks/fake/{three → exercises/three}/example.ext +0 -0
- data/fixtures/tracks/fake/{three → exercises/three}/three_test.ext +0 -0
- data/fixtures/tracks/fake/{two → exercises/two}/example.ext +0 -0
- data/fixtures/tracks/fake/{two → exercises/two}/two_test.ext +0 -0
- data/lib/trackler/implementation.rb +29 -35
- data/lib/trackler/implementations.rb +7 -1
- data/lib/trackler/track.rb +4 -3
- data/lib/trackler/version.rb +1 -1
- data/lib/trackler.rb +1 -1
- data/tracks/ecmascript/.github/stale.yml +6 -0
- data/tracks/ecmascript/README.md +17 -9
- data/tracks/go/README.md +7 -4
- data/tracks/go/config.json +5 -2
- data/tracks/go/exercises/atbash-cipher/.meta/gen.go +0 -2
- data/tracks/go/exercises/bob/.meta/gen.go +0 -2
- data/tracks/go/exercises/bowling/.meta/gen.go +0 -2
- data/tracks/go/exercises/bracket-push/.meta/gen.go +0 -2
- data/tracks/go/exercises/change/.meta/gen.go +0 -2
- data/tracks/go/exercises/clock/.meta/gen.go +0 -2
- data/tracks/go/exercises/clock/example_clock_test.go +34 -20
- data/tracks/go/exercises/connect/.meta/gen.go +0 -2
- data/tracks/go/exercises/custom-set/.meta/gen.go +0 -2
- data/tracks/go/exercises/forth/.meta/gen.go +0 -2
- data/tracks/go/exercises/gigasecond/.meta/gen.go +0 -2
- data/tracks/go/exercises/hamming/.meta/gen.go +0 -2
- data/tracks/go/exercises/largest-series-product/.meta/gen.go +0 -2
- data/tracks/go/exercises/leap/.meta/gen.go +0 -2
- data/tracks/go/exercises/luhn/.meta/gen.go +0 -2
- data/tracks/go/exercises/meetup/.meta/gen.go +0 -2
- data/tracks/go/exercises/phone-number/.meta/gen.go +0 -2
- data/tracks/go/exercises/raindrops/.meta/gen.go +0 -2
- data/tracks/go/exercises/rna-transcription/.meta/gen.go +0 -2
- data/tracks/go/exercises/roman-numerals/.meta/gen.go +0 -2
- data/tracks/go/exercises/scrabble-score/.meta/gen.go +0 -2
- data/tracks/go/exercises/transpose/.meta/gen.go +0 -2
- data/tracks/go/exercises/variable-length-quantity/.meta/gen.go +113 -0
- data/tracks/go/exercises/variable-length-quantity/cases_test.go +161 -0
- data/tracks/go/exercises/variable-length-quantity/example.go +54 -11
- data/tracks/go/exercises/variable-length-quantity/variable_length_quantity_test.go +19 -31
- data/tracks/go/exercises/word-count/.meta/gen.go +0 -2
- data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +3 -16
- data/tracks/java/exercises/diamond/src/test/java/DiamondPrinterTest.java +1 -1
- data/tracks/java/exercises/hello-world/HINT.md +7 -0
- data/tracks/java/exercises/largest-series-product/src/test/java/LargestSeriesProductCalculatorTest.java +1 -1
- data/tracks/java/exercises/linked-list/src/test/java/DoublyLinkedListTest.java +48 -38
- data/tracks/java/exercises/luhn/src/main/java/LuhnValidator.java +7 -0
- data/tracks/java/exercises/minesweeper/src/test/java/MinesweeperBoardTest.java +1 -1
- data/tracks/java/exercises/perfect-numbers/src/test/java/NaturalNumberTest.java +1 -1
- data/tracks/java/exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java +1 -1
- data/tracks/java/exercises/rectangles/src/test/java/RectangleCounterTest.java +1 -1
- data/tracks/java/exercises/secret-handshake/src/main/java/HandshakeCalculator.java +5 -1
- data/tracks/java/exercises/sum-of-multiples/src/main/java/SumOfMultiples.java +10 -2
- data/tracks/java/exercises/triangle/src/example/java/Triangle.java +5 -5
- data/tracks/java/exercises/triangle/src/example/java/TriangleException.java +1 -3
- data/tracks/java/exercises/triangle/src/main/java/Triangle.java +11 -0
- data/tracks/java/exercises/triangle/src/main/java/TriangleException.java +1 -3
- data/tracks/javascript/.github/stale.yml +6 -0
- data/tracks/javascript/config.json +14 -0
- data/tracks/kotlin/docs/INSTALLATION.md +1 -1
- data/tracks/lisp/docs/INSTALLATION.md +1 -0
- data/tracks/perl6/README.md +9 -4
- data/tracks/perl6/config.json +5 -0
- data/tracks/perl6/exercises/luhn/Example.pm6 +15 -0
- data/tracks/perl6/exercises/luhn/Luhn.pm6 +4 -0
- data/tracks/perl6/exercises/luhn/example.yaml +6 -0
- data/tracks/perl6/exercises/luhn/luhn.t +122 -0
- data/tracks/python/exercises/acronym/acronym_test.py +1 -4
- data/tracks/r/exercises/hamming/test_hamming.R +15 -14
- data/tracks/ruby/lib/generator/command_line/generator_optparser.rb +3 -1
- data/tracks/ruby/lib/generator/exercise_case/assertion.rb +33 -5
- data/tracks/ruby/lib/generator/exercise_case/case_helpers.rb +39 -0
- data/tracks/ruby/lib/generator/exercise_case.rb +3 -37
- data/tracks/ruby/lib/generator/template_values.rb +2 -0
- data/tracks/ruby/test/generator/command_line/generator_optparser_test.rb +11 -2
- data/tracks/ruby/test/generator/exercise_case/case_helpers_test.rb +43 -0
- data/tracks/ruby/test/generator/underscore_test.rb +4 -0
- data/tracks/scala/config.json +10 -0
- data/tracks/scala/exercises/beer-song/build.sbt +3 -0
- data/tracks/scala/exercises/beer-song/example.scala +11 -0
- data/tracks/{java/exercises/luhn/src/main/java → scala/exercises/beer-song/src/main/scala}/.keep +0 -0
- data/tracks/scala/exercises/beer-song/src/test/scala/BeerSongTest.scala +52 -0
- data/tracks/vimscript/.travis.yml +13 -2
- data/tracks/vimscript/TRACK_HINTS.md +67 -0
- data/tracks/vimscript/bin/ci +21 -0
- data/tracks/vimscript/config.json +22 -8
- data/tracks/vimscript/docs/ABOUT.md +44 -0
- data/tracks/vimscript/docs/INSTALLATION.md +55 -0
- data/tracks/vimscript/docs/LEARNING.md +16 -0
- data/tracks/vimscript/docs/RESOURCES.md +24 -0
- data/tracks/vimscript/docs/TESTS.md +67 -0
- data/tracks/vimscript/exercises/bob/bob.vader +63 -0
- data/tracks/vimscript/exercises/bob/bob.vim +8 -0
- data/tracks/vimscript/exercises/bob/example.vim +23 -0
- data/tracks/vimscript/exercises/hamming/example.vim +18 -0
- data/tracks/vimscript/exercises/hamming/hamming.vader +20 -0
- data/tracks/vimscript/exercises/hamming/hamming.vim +13 -0
- data/tracks/vimscript/exercises/hello-world/example.vim +4 -0
- data/tracks/vimscript/exercises/hello-world/hello_world.vader +8 -0
- data/tracks/vimscript/exercises/hello-world/hello_world.vim +20 -0
- data/tracks/vimscript/exercises/leap/example.vim +3 -0
- data/tracks/vimscript/exercises/leap/leap.vader +11 -0
- data/tracks/vimscript/exercises/leap/leap.vim +9 -0
- metadata +47 -18
- 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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|