trackler 2.0.8.18 → 2.0.8.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/common/.gitignore +1 -0
- data/common/.travis.yml +5 -8
- data/common/README.md +18 -5
- data/common/exercises/grep/canonical-data.json +290 -269
- data/common/exercises/phone-number/canonical-data.json +2 -2
- data/common/exercises/pov/canonical-data.json +2 -5
- data/common/exercises/roman-numerals/canonical-data.json +112 -74
- data/common/exercises/tournament/canonical-data.json +86 -85
- data/common/exercises/two-bucket/canonical-data.json +55 -47
- data/common/package.json +16 -0
- data/common/yarn.lock +195 -0
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/docs/LEARNING.md +1 -1
- data/tracks/c/exercises/space-age/src/example.c +15 -47
- data/tracks/c/exercises/space-age/src/example.h +12 -8
- data/tracks/c/exercises/space-age/test/test_space_age.c +8 -8
- data/tracks/ceylon/docs/TESTS.md +5 -2
- data/tracks/ceylon/exercises/TRACK_HINTS.md +5 -2
- data/tracks/csharp/.gitignore +0 -4
- data/tracks/csharp/.travis.yml +9 -20
- data/tracks/csharp/appveyor.yml +2 -4
- data/tracks/csharp/build.cake +95 -0
- data/tracks/csharp/build.ps1 +189 -0
- data/tracks/csharp/build.sh +99 -31
- data/tracks/csharp/circle.yml +3 -12
- data/tracks/delphi/config.json +8 -0
- data/tracks/delphi/exercises/minesweeper/MineSweeper.dpr +60 -0
- data/tracks/delphi/exercises/minesweeper/uMineSweeperExample.pas +70 -0
- data/tracks/delphi/exercises/minesweeper/uMineSweeperTest.pas +270 -0
- data/tracks/dlang/config.json +86 -31
- data/tracks/elixir/config.json +7 -0
- data/tracks/elixir/exercises/rotational-cipher/example.exs +35 -0
- data/tracks/elixir/exercises/rotational-cipher/rotational_cipher.exs +13 -0
- data/tracks/elixir/exercises/rotational-cipher/rotational_cipher_test.exs +80 -0
- data/tracks/go/exercises/raindrops/raindrops_test.go +4 -1
- data/tracks/go/exercises/react/react_test.go +6 -8
- data/tracks/go/exercises/rna-transcription/rna_transcription_test.go +4 -1
- data/tracks/go/exercises/robot-simulator/robot_simulator_test.go +5 -2
- data/tracks/haskell/exercises/allergies/src/Allergies.hs +2 -2
- data/tracks/haskell/exercises/atbash-cipher/src/Atbash.hs +2 -2
- data/tracks/haskell/exercises/bank-account/src/BankAccount.hs +3 -3
- data/tracks/haskell/exercises/binary-search-tree/src/BST.hs +7 -7
- data/tracks/haskell/exercises/bowling/src/Bowling.hs +1 -1
- data/tracks/haskell/exercises/clock/src/Clock.hs +4 -4
- data/tracks/haskell/exercises/connect/src/Connect.hs +1 -1
- data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +1 -1
- data/tracks/haskell/exercises/custom-set/src/CustomSet.hs +12 -12
- data/tracks/haskell/exercises/difference-of-squares/src/Squares.hs +3 -3
- data/tracks/haskell/exercises/etl/src/ETL.hs +1 -1
- data/tracks/haskell/exercises/forth/src/Forth.hs +2 -2
- data/tracks/haskell/exercises/go-counting/src/Counting.hs +2 -2
- data/tracks/haskell/exercises/kindergarten-garden/src/Garden.hs +3 -3
- data/tracks/haskell/exercises/largest-series-product/src/Series.hs +1 -1
- data/tracks/haskell/exercises/lens-person/src/Person.hs +4 -4
- data/tracks/julia/.travis.yml +3 -2
- data/tracks/ocaml/exercises/all-your-base/test.ml +2 -2
- data/tracks/ocaml/exercises/beer-song/test.ml +25 -24
- data/tracks/ocaml/exercises/phone-number/test.ml +22 -22
- data/tracks/ocaml/exercises/run-length-encoding/test.ml +5 -5
- data/tracks/ocaml/exercises/word-count/test.ml +1 -1
- data/tracks/ocaml/tools/test-generator/templates/beer-song/template.ml +20 -1
- data/tracks/purescript/config.json +7 -0
- data/tracks/purescript/exercises/word-count/bower.json +17 -0
- data/tracks/purescript/exercises/word-count/examples/src/WordCount.purs +31 -0
- data/tracks/purescript/exercises/word-count/src/WordCount.purs +3 -0
- data/tracks/purescript/exercises/word-count/test/Main.purs +89 -0
- data/tracks/python/exercises/accumulate/accumulate.py +2 -0
- data/tracks/python/exercises/acronym/acronym.py +2 -0
- data/tracks/python/exercises/allergies/allergies.py +3 -0
- data/tracks/python/exercises/allergies/example.py +1 -1
- data/tracks/python/exercises/anagram/anagram.py +2 -0
- data/tracks/python/exercises/atbash-cipher/atbash_cipher.py +6 -0
- data/tracks/python/exercises/beer-song/beer_song.py +6 -0
- data/tracks/python/exercises/binary-search/binary_search.py +2 -0
- data/tracks/python/exercises/binary/binary.py +2 -0
- data/tracks/python/exercises/bob/bob.py +2 -8
- data/tracks/python/exercises/bracket-push/bracket_push.py +2 -0
- data/tracks/python/exercises/circular-buffer/circular_buffer.py +11 -0
- data/tracks/python/exercises/clock/clock.py +3 -0
- data/tracks/python/exercises/clock/example.py +1 -1
- data/tracks/python/exercises/crypto-square/crypto_square.py +2 -0
- data/tracks/python/exercises/diamond/diamond.py +2 -0
- data/tracks/python/exercises/difference-of-squares/difference_of_squares.py +10 -0
- data/tracks/python/exercises/etl/etl.py +2 -0
- data/tracks/python/exercises/flatten-array/flatten_array.py +2 -0
- data/tracks/python/exercises/gigasecond/gigasecond.py +2 -0
- data/tracks/python/exercises/grade-school/grade_school.py +3 -0
- data/tracks/python/exercises/grains/grains.py +6 -0
- data/tracks/python/exercises/hamming/hamming.py +2 -0
- data/tracks/python/exercises/hello-world/hello_world.py +2 -7
- data/tracks/python/exercises/hexadecimal/hexadecimal.py +2 -0
- data/tracks/python/exercises/house/house.py +6 -0
- data/tracks/python/exercises/kindergarten-garden/kindergarten_garden.py +3 -0
- data/tracks/python/exercises/largest-series-product/largest_series_product.py +2 -0
- data/tracks/python/exercises/leap/leap.py +2 -0
- data/tracks/python/exercises/linked-list/linked_list.py +2 -8
- data/tracks/python/exercises/list-ops/list_ops.py +18 -22
- data/tracks/python/exercises/luhn/luhn.py +3 -0
- data/tracks/python/exercises/matrix/matrix.py +3 -0
- data/tracks/python/exercises/meetup/meetup.py +2 -0
- data/tracks/python/exercises/minesweeper/minesweeper.py +2 -0
- data/tracks/python/exercises/nth-prime/nth_prime.py +2 -0
- data/tracks/python/exercises/nucleotide-count/nucleotide_count.py +6 -0
- data/tracks/python/exercises/ocr-numbers/ocr_numbers.py +6 -0
- data/tracks/python/exercises/ocr-numbers/{ocr_test.py → ocr_numbers_test.py} +0 -0
- data/tracks/python/exercises/octal/octal.py +2 -0
- data/tracks/python/exercises/palindrome-products/palindrome_products.py +6 -0
- data/tracks/python/exercises/pangram/pangram.py +2 -0
- data/tracks/python/exercises/pascals-triangle/pascals_triangle.py +10 -0
- data/tracks/python/exercises/perfect-numbers/perfect_numbers.py +6 -0
- data/tracks/python/exercises/phone-number/phone_number.py +3 -0
- data/tracks/python/exercises/pig-latin/pig_latin.py +2 -0
- data/tracks/python/exercises/point-mutations/point_mutations.py +2 -0
- data/tracks/python/exercises/poker/poker.py +2 -0
- data/tracks/python/exercises/prime-factors/prime_factors.py +2 -0
- data/tracks/python/exercises/proverb/proverb.py +2 -0
- data/tracks/python/exercises/pythagorean-triplet/pythagorean_triplet.py +10 -0
- data/tracks/python/exercises/queen-attack/queen_attack.py +6 -0
- data/tracks/python/exercises/rail-fence-cipher/rail_fence_cipher.py +10 -0
- data/tracks/python/exercises/raindrops/raindrops.py +2 -0
- data/tracks/python/exercises/rectangles/example.py +1 -1
- data/tracks/python/exercises/rectangles/rectangles.py +2 -0
- data/tracks/python/exercises/rectangles/{rectangles_count_test.py → rectangles_test.py} +0 -0
- data/tracks/python/exercises/rna-transcription/rna_transcription.py +2 -0
- data/tracks/python/exercises/robot-name/robot_name.py +3 -0
- data/tracks/python/exercises/robot-simulator/robot_simulator.py +3 -0
- data/tracks/python/exercises/roman-numerals/roman_numerals.py +2 -0
- data/tracks/python/exercises/run-length-encoding/run_length_encoding.py +6 -0
- data/tracks/python/exercises/run-length-encoding/{run_length_test.py → run_length_encoding_test.py} +1 -1
- data/tracks/python/exercises/saddle-points/saddle_points.py +2 -0
- data/tracks/python/exercises/say/example.py +1 -1
- data/tracks/python/exercises/say/say.py +2 -0
- data/tracks/python/exercises/say/say_test.py +3 -0
- data/tracks/python/exercises/scrabble-score/scrabble_score.py +2 -0
- data/tracks/python/exercises/secret-handshake/secret_handshake.py +6 -0
- data/tracks/python/exercises/secret-handshake/{handshake_test.py → secret_handshake_test.py} +0 -0
- data/tracks/python/exercises/series/series.py +2 -0
- data/tracks/python/exercises/sieve/sieve.py +2 -0
- data/tracks/python/exercises/simple-cipher/example.py +1 -1
- data/tracks/python/exercises/simple-cipher/simple_cipher.py +8 -0
- data/tracks/python/exercises/space-age/space_age.py +3 -0
- data/tracks/python/exercises/strain/strain.py +6 -0
- data/tracks/python/exercises/sublist/sublist.py +2 -0
- data/tracks/python/exercises/sum-of-multiples/sum_of_multiples.py +2 -0
- data/tracks/python/exercises/triangle/triangle.py +7 -0
- data/tracks/python/exercises/trinary/trinary.py +2 -0
- data/tracks/python/exercises/twelve-days/twelve_days.py +10 -0
- data/tracks/python/exercises/word-count/word_count.py +2 -0
- data/tracks/python/exercises/wordy/wordy.py +2 -0
- data/tracks/python/exercises/zebra-puzzle/zebra_puzzle.py +2 -0
- data/tracks/ruby/exercises/beer-song/.meta/.version +1 -0
- data/tracks/ruby/exercises/beer-song/beer_song_test.rb +62 -36
- data/tracks/ruby/exercises/beer-song/example.rb +1 -5
- data/tracks/ruby/exercises/beer-song/example.tt +22 -0
- data/tracks/ruby/lib/beer_song_cases.rb +43 -0
- data/tracks/swift/exercises/matrix/Tests/MatrixTests/MatrixTests.swift +1 -1
- metadata +94 -13
- data/common/bin/jsonlint +0 -27
- data/tracks/csharp/.paket/paket.bootstrapper.exe +0 -0
- data/tracks/csharp/Zipper.cs +0 -137
- data/tracks/csharp/build.cmd +0 -14
- data/tracks/csharp/build.fsx +0 -78
- data/tracks/csharp/paket.dependencies +0 -2
- data/tracks/csharp/paket.lock +0 -3
@@ -1,12 +1,6 @@
|
|
1
|
-
# Skeleton file for the Python "linked-list" exercise.
|
2
|
-
# Implement the LinkedList class
|
3
|
-
|
4
|
-
|
5
1
|
class Node(object):
|
6
|
-
def __init__(self
|
7
|
-
|
8
|
-
self.next = next
|
9
|
-
self.prev = prev
|
2
|
+
def __init__(self):
|
3
|
+
pass
|
10
4
|
|
11
5
|
|
12
6
|
class LinkedList(object):
|
@@ -1,38 +1,34 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
def map_clone():
|
2
|
+
pass
|
3
3
|
|
4
4
|
|
5
|
-
def
|
6
|
-
|
5
|
+
def length():
|
6
|
+
pass
|
7
7
|
|
8
8
|
|
9
|
-
def
|
10
|
-
|
9
|
+
def filter_clone():
|
10
|
+
pass
|
11
11
|
|
12
12
|
|
13
|
-
def
|
14
|
-
|
13
|
+
def reverse():
|
14
|
+
pass
|
15
15
|
|
16
16
|
|
17
|
-
def
|
18
|
-
|
17
|
+
def append():
|
18
|
+
pass
|
19
19
|
|
20
20
|
|
21
|
-
def
|
22
|
-
|
21
|
+
def foldl():
|
22
|
+
pass
|
23
23
|
|
24
24
|
|
25
|
-
def
|
26
|
-
|
25
|
+
def foldr():
|
26
|
+
pass
|
27
27
|
|
28
28
|
|
29
|
-
def
|
30
|
-
|
29
|
+
def flat():
|
30
|
+
pass
|
31
31
|
|
32
32
|
|
33
|
-
def
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
def concat(xs, ys):
|
38
|
-
return xs
|
33
|
+
def concat():
|
34
|
+
pass
|
File without changes
|
File without changes
|
@@ -25,7 +25,7 @@ def say(number, recursive=False):
|
|
25
25
|
if number < k:
|
26
26
|
if number % 100 == 0:
|
27
27
|
return small[number // 100] + ' hundred'
|
28
|
-
return small[number // 100] + ' hundred and ' + say(number % 100
|
28
|
+
return small[number // 100] + ' hundred and ' + say(number % 100)
|
29
29
|
|
30
30
|
if number < m:
|
31
31
|
if number % k == 0:
|
@@ -33,6 +33,9 @@ class SayTest(unittest.TestCase):
|
|
33
33
|
self.assertEqual("one thousand two hundred and thirty-four",
|
34
34
|
say(1234))
|
35
35
|
|
36
|
+
def test_eight_hundred_and_ten_thousand(self):
|
37
|
+
self.assertEqual("eight hundred and ten thousand", say(810000))
|
38
|
+
|
36
39
|
def test_one_million(self):
|
37
40
|
self.assertEqual("one million", say(1e6))
|
38
41
|
|