trackler 2.2.0.4 → 2.2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/bash/config.json +10 -2
- data/tracks/bash/exercises/word-count/example.awk +12 -0
- data/tracks/bash/exercises/word-count/example.sh +21 -0
- data/tracks/c/config.json +0 -2
- data/tracks/ceylon/config.json +0 -2
- data/tracks/{erlang/exercises/all-your-base/.meta/readme.go.tmpl → clojure/config/exercise_readme.go.tmpl} +0 -1
- data/tracks/clojure/exercises/accumulate/README.md +35 -0
- data/tracks/clojure/exercises/acronym/README.md +15 -0
- data/tracks/clojure/exercises/all-your-base/README.md +35 -0
- data/tracks/clojure/exercises/allergies/README.md +37 -0
- data/tracks/clojure/exercises/anagram/README.md +13 -0
- data/tracks/clojure/exercises/atbash-cipher/README.md +34 -0
- data/tracks/clojure/exercises/bank-account/README.md +30 -0
- data/tracks/clojure/exercises/beer-song/README.md +327 -0
- data/tracks/clojure/exercises/binary/README.md +35 -0
- data/tracks/clojure/exercises/binary-search/README.md +41 -0
- data/tracks/clojure/exercises/binary-search-tree/README.md +60 -0
- data/tracks/clojure/exercises/bob/README.md +18 -0
- data/tracks/clojure/exercises/bracket-push/README.md +10 -0
- data/tracks/clojure/exercises/change/README.md +23 -0
- data/tracks/clojure/exercises/clock/README.md +13 -0
- data/tracks/clojure/exercises/crypto-square/README.md +74 -0
- data/tracks/clojure/exercises/difference-of-squares/README.md +19 -0
- data/tracks/clojure/exercises/etl/README.md +51 -0
- data/tracks/clojure/exercises/flatten-array/README.md +18 -0
- data/tracks/clojure/exercises/gigasecond/README.md +11 -0
- data/tracks/clojure/exercises/grade-school/README.md +42 -0
- data/tracks/clojure/exercises/grains/README.md +34 -0
- data/tracks/clojure/exercises/hamming/README.md +42 -0
- data/tracks/clojure/exercises/hello-world/README.md +51 -0
- data/tracks/clojure/exercises/hexadecimal/README.md +14 -0
- data/tracks/clojure/exercises/isogram/README.md +19 -0
- data/tracks/clojure/exercises/kindergarten-garden/README.md +66 -0
- data/tracks/clojure/exercises/largest-series-product/README.md +20 -0
- data/tracks/clojure/exercises/leap/README.md +33 -0
- data/tracks/clojure/exercises/luhn/README.md +71 -0
- data/tracks/clojure/exercises/meetup/README.md +30 -0
- data/tracks/clojure/exercises/minesweeper/README.md +30 -0
- data/tracks/clojure/exercises/nth-prime/README.md +15 -0
- data/tracks/clojure/exercises/nucleotide-count/README.md +33 -0
- data/tracks/clojure/exercises/octal/README.md +49 -0
- data/tracks/clojure/exercises/pangram/README.md +15 -0
- data/tracks/clojure/exercises/pascals-triangle/README.md +21 -0
- data/tracks/clojure/exercises/perfect-numbers/README.md +24 -0
- data/tracks/clojure/exercises/phone-number/README.md +34 -0
- data/tracks/clojure/exercises/pig-latin/README.md +24 -0
- data/tracks/clojure/exercises/pov/README.md +46 -0
- data/tracks/clojure/exercises/prime-factors/README.md +36 -0
- data/tracks/clojure/exercises/queen-attack/README.md +33 -0
- data/tracks/clojure/exercises/raindrops/README.md +24 -0
- data/tracks/clojure/exercises/rna-transcription/README.md +25 -0
- data/tracks/clojure/exercises/robot-name/README.md +22 -0
- data/tracks/clojure/exercises/robot-simulator/README.md +34 -0
- data/tracks/clojure/exercises/roman-numerals/README.md +49 -0
- data/tracks/clojure/exercises/rotational-cipher/README.md +36 -0
- data/tracks/clojure/exercises/scrabble-score/README.md +44 -0
- data/tracks/clojure/exercises/secret-handshake/README.md +35 -0
- data/tracks/clojure/exercises/sieve/README.md +34 -0
- data/tracks/clojure/exercises/space-age/README.md +24 -0
- data/tracks/clojure/exercises/strain/README.md +40 -0
- data/tracks/clojure/exercises/sublist/README.md +21 -0
- data/tracks/clojure/exercises/sum-of-multiples/README.md +18 -0
- data/tracks/clojure/exercises/triangle/README.md +26 -0
- data/tracks/clojure/exercises/trinary/README.md +28 -0
- data/tracks/clojure/exercises/word-count/README.md +19 -0
- data/tracks/clojure/exercises/wordy/README.md +63 -0
- data/tracks/{erlang/exercises/allergies/.meta/readme.go.tmpl → crystal/config/exercise_readme.go.tmpl} +0 -1
- data/tracks/crystal/config.json +0 -2
- data/tracks/crystal/exercises/acronym/README.md +38 -0
- data/tracks/crystal/exercises/anagram/README.md +36 -0
- data/tracks/crystal/exercises/atbash-cipher/README.md +57 -0
- data/tracks/crystal/exercises/binary/README.md +58 -0
- data/tracks/crystal/exercises/binary-search-tree/README.md +83 -0
- data/tracks/crystal/exercises/bob/README.md +41 -0
- data/tracks/crystal/exercises/bracket-push/README.md +33 -0
- data/tracks/crystal/exercises/difference-of-squares/README.md +42 -0
- data/tracks/crystal/exercises/flatten-array/README.md +41 -0
- data/tracks/crystal/exercises/forth/README.md +52 -0
- data/tracks/crystal/exercises/gigasecond/README.md +34 -0
- data/tracks/crystal/exercises/hamming/README.md +65 -0
- data/tracks/crystal/exercises/hello-world/README.md +78 -0
- data/tracks/crystal/exercises/largest-series-product/README.md +43 -0
- data/tracks/crystal/exercises/leap/README.md +56 -0
- data/tracks/crystal/exercises/pangram/README.md +38 -0
- data/tracks/crystal/exercises/pascals-triangle/README.md +44 -0
- data/tracks/crystal/exercises/raindrops/README.md +47 -0
- data/tracks/crystal/exercises/react/README.md +42 -0
- data/tracks/crystal/exercises/rna-transcription/README.md +48 -0
- data/tracks/crystal/exercises/roman-numerals/README.md +72 -0
- data/tracks/crystal/exercises/run-length-encoding/README.md +53 -0
- data/tracks/crystal/exercises/sieve/README.md +57 -0
- data/tracks/csharp/config.json +0 -2
- data/tracks/delphi/config.json +0 -2
- data/tracks/ecmascript/config.json +63 -2
- data/tracks/erlang/{exercises/anagram/.meta/readme.go.tmpl → config/exercise_readme.go.tmpl} +0 -1
- data/tracks/erlang/config.json +0 -2
- data/tracks/erlang/exercises/accumulate/README.md +0 -1
- data/tracks/erlang/exercises/all-your-base/README.md +0 -1
- data/tracks/erlang/exercises/allergies/README.md +0 -1
- data/tracks/erlang/exercises/anagram/README.md +0 -1
- data/tracks/erlang/exercises/atbash-cipher/README.md +0 -1
- data/tracks/erlang/exercises/bank-account/README.md +0 -1
- data/tracks/erlang/exercises/beer-song/README.md +0 -1
- data/tracks/erlang/exercises/bob/README.md +0 -1
- data/tracks/erlang/exercises/circular-buffer/README.md +0 -1
- data/tracks/erlang/exercises/clock/README.md +0 -1
- data/tracks/erlang/exercises/collatz-conjecture/README.md +0 -1
- data/tracks/erlang/exercises/difference-of-squares/README.md +0 -1
- data/tracks/erlang/exercises/etl/README.md +0 -1
- data/tracks/erlang/exercises/gigasecond/README.md +0 -1
- data/tracks/erlang/exercises/grade-school/README.md +0 -1
- data/tracks/erlang/exercises/grains/README.md +0 -1
- data/tracks/erlang/exercises/hamming/README.md +0 -1
- data/tracks/erlang/exercises/hello-world/README.md +0 -1
- data/tracks/erlang/exercises/largest-series-product/README.md +0 -1
- data/tracks/erlang/exercises/leap/README.md +0 -1
- data/tracks/erlang/exercises/luhn/README.md +0 -1
- data/tracks/erlang/exercises/meetup/README.md +0 -1
- data/tracks/erlang/exercises/nucleotide-count/README.md +0 -1
- data/tracks/erlang/exercises/parallel-letter-frequency/README.md +0 -1
- data/tracks/erlang/exercises/phone-number/README.md +0 -1
- data/tracks/erlang/exercises/rna-transcription/README.md +0 -1
- data/tracks/erlang/exercises/robot-simulator/README.md +0 -1
- data/tracks/erlang/exercises/roman-numerals/README.md +0 -1
- data/tracks/erlang/exercises/rotational-cipher/README.md +0 -1
- data/tracks/erlang/exercises/scrabble-score/README.md +0 -1
- data/tracks/erlang/exercises/series/README.md +0 -1
- data/tracks/erlang/exercises/space-age/README.md +0 -1
- data/tracks/erlang/exercises/spiral-matrix/README.md +0 -1
- data/tracks/erlang/exercises/strain/README.md +0 -1
- data/tracks/erlang/exercises/sum-of-multiples/README.md +0 -1
- data/tracks/erlang/exercises/triangle/README.md +0 -1
- data/tracks/erlang/exercises/word-count/README.md +0 -1
- data/tracks/erlang/exercises/zipper/README.md +0 -1
- data/tracks/factor/config.json +0 -2
- data/tracks/fsharp/config.json +0 -2
- data/tracks/go/config.json +12 -6
- data/tracks/go/exercises/bank-account/bank_account_test.go +60 -1
- data/tracks/go/exercises/error-handling/common.go +17 -0
- data/tracks/go/exercises/error-handling/error_handling_test.go +37 -4
- data/tracks/haskell/config.json +0 -2
- data/tracks/java/config.json +10 -2
- data/tracks/{erlang/exercises/accumulate → java/exercises/forth}/.meta/readme.go.tmpl +0 -0
- data/tracks/java/exercises/forth/README.md +41 -0
- data/tracks/java/exercises/forth/build.gradle +18 -0
- data/tracks/java/exercises/forth/src/example/java/ForthEvaluator.java +154 -0
- data/tracks/java/exercises/forth/src/example/java/Token.java +90 -0
- data/tracks/java/exercises/forth/src/main/java/.keep +0 -0
- data/tracks/java/exercises/forth/src/test/java/ForthEvaluatorTest.java +355 -0
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/javascript/config.json +0 -2
- data/tracks/kotlin/config.json +30 -2
- data/tracks/kotlin/exercises/forth/README.md +32 -0
- data/tracks/kotlin/exercises/forth/build.gradle +28 -0
- data/tracks/kotlin/exercises/forth/src/example/kotlin/ForthEvaluator.kt +138 -0
- data/tracks/kotlin/exercises/forth/src/main/kotlin/.keep +0 -0
- data/tracks/kotlin/exercises/forth/src/test/kotlin/ForthEvaluatorTest.kt +352 -0
- data/tracks/kotlin/exercises/meetup/README.md +33 -0
- data/tracks/kotlin/exercises/meetup/build.gradle +28 -0
- data/tracks/kotlin/exercises/meetup/src/example/kotlin/Meetup.kt +45 -0
- data/tracks/kotlin/exercises/meetup/src/example/kotlin/MeetupSchedule.kt +1 -0
- data/tracks/kotlin/exercises/meetup/src/main/kotlin/MeetupSchedule.kt +5 -0
- data/tracks/kotlin/exercises/meetup/src/test/kotlin/MeetupTest.kt +771 -0
- data/tracks/kotlin/exercises/say/README.md +72 -0
- data/tracks/kotlin/exercises/say/build.gradle +28 -0
- data/tracks/kotlin/exercises/say/src/example/kotlin/NumberSpeller.kt +88 -0
- data/tracks/kotlin/exercises/say/src/main/kotlin/.keep +0 -0
- data/tracks/kotlin/exercises/say/src/test/kotlin/NumberSpellerTest.kt +138 -0
- data/tracks/kotlin/exercises/settings.gradle +3 -0
- data/tracks/lua/config.json +0 -2
- data/tracks/mips/config.json +0 -2
- data/tracks/ocaml/config.json +0 -2
- data/tracks/perl5/config.json +262 -67
- data/tracks/perl6/config.json +98 -26
- data/tracks/php/docs/INSTALLATION.md +1 -1
- data/tracks/powershell/config.json +0 -2
- data/tracks/purescript/config.json +0 -2
- data/tracks/python/README.md +2 -2
- data/tracks/python/config/exercise_readme.go.tmpl +16 -0
- data/tracks/python/config.json +280 -15
- data/tracks/python/exercises/accumulate/README.md +46 -0
- data/tracks/python/exercises/acronym/README.md +26 -0
- data/tracks/python/exercises/all-your-base/README.md +46 -0
- data/tracks/python/exercises/allergies/README.md +48 -0
- data/tracks/python/exercises/alphametics/README.md +46 -0
- data/tracks/python/exercises/anagram/README.md +24 -0
- data/tracks/python/exercises/atbash-cipher/README.md +45 -0
- data/tracks/python/exercises/beer-song/README.md +338 -0
- data/tracks/python/exercises/binary/README.md +46 -0
- data/tracks/python/exercises/binary-search/README.md +52 -0
- data/tracks/python/exercises/bob/README.md +29 -0
- data/tracks/python/exercises/book-store/README.md +85 -0
- data/tracks/python/exercises/bracket-push/README.md +21 -0
- data/tracks/python/exercises/circular-buffer/README.md +61 -0
- data/tracks/python/exercises/clock/README.md +24 -0
- data/tracks/python/exercises/crypto-square/README.md +85 -0
- data/tracks/python/exercises/diamond/README.md +70 -0
- data/tracks/python/exercises/difference-of-squares/README.md +30 -0
- data/tracks/python/exercises/etl/README.md +62 -0
- data/tracks/python/exercises/flatten-array/README.md +29 -0
- data/tracks/python/exercises/gigasecond/README.md +22 -0
- data/tracks/python/exercises/grade-school/README.md +53 -0
- data/tracks/python/exercises/grains/README.md +45 -0
- data/tracks/python/exercises/grep/README.md +82 -0
- data/tracks/python/exercises/hamming/README.md +53 -0
- data/tracks/python/exercises/hello-world/README.md +32 -0
- data/tracks/python/exercises/hexadecimal/README.md +25 -0
- data/tracks/python/exercises/house/README.md +124 -0
- data/tracks/python/exercises/isogram/README.md +30 -0
- data/tracks/python/exercises/kindergarten-garden/README.md +77 -0
- data/tracks/python/exercises/largest-series-product/README.md +31 -0
- data/tracks/python/exercises/leap/README.md +44 -0
- data/tracks/python/exercises/linked-list/README.md +45 -0
- data/tracks/python/exercises/list-ops/README.md +21 -0
- data/tracks/python/exercises/luhn/README.md +82 -0
- data/tracks/python/exercises/matrix/README.md +56 -0
- data/tracks/python/exercises/meetup/README.md +41 -0
- data/tracks/python/exercises/minesweeper/README.md +41 -0
- data/tracks/python/exercises/nth-prime/README.md +26 -0
- data/tracks/python/exercises/nucleotide-count/README.md +44 -0
- data/tracks/python/exercises/ocr-numbers/README.md +96 -0
- data/tracks/python/exercises/octal/README.md +60 -0
- data/tracks/python/exercises/palindrome-products/README.md +51 -0
- data/tracks/python/exercises/pangram/README.md +26 -0
- data/tracks/python/exercises/pascals-triangle/README.md +32 -0
- data/tracks/python/exercises/perfect-numbers/README.md +35 -0
- data/tracks/python/exercises/phone-number/README.md +45 -0
- data/tracks/python/exercises/pig-latin/README.md +35 -0
- data/tracks/python/exercises/point-mutations/README.md +52 -0
- data/tracks/python/exercises/poker/README.md +23 -0
- data/tracks/python/exercises/prime-factors/README.md +47 -0
- data/tracks/python/exercises/protein-translation/README.md +60 -0
- data/tracks/python/exercises/proverb/README.md +29 -0
- data/tracks/python/exercises/pythagorean-triplet/README.md +35 -0
- data/tracks/python/exercises/queen-attack/README.md +44 -0
- data/tracks/python/exercises/rail-fence-cipher/README.md +71 -0
- data/tracks/python/exercises/raindrops/README.md +35 -0
- data/tracks/python/exercises/rectangles/README.md +78 -0
- data/tracks/python/exercises/rna-transcription/README.md +36 -0
- data/tracks/python/exercises/robot-name/README.md +33 -0
- data/tracks/python/exercises/robot-simulator/README.md +45 -0
- data/tracks/python/exercises/roman-numerals/README.md +60 -0
- data/tracks/python/exercises/rotational-cipher/README.md +47 -0
- data/tracks/python/exercises/run-length-encoding/README.md +41 -0
- data/tracks/python/exercises/saddle-points/README.md +44 -0
- data/tracks/python/exercises/say/README.md +80 -0
- data/tracks/python/exercises/scale-generator/README.md +71 -0
- data/tracks/python/exercises/scrabble-score/README.md +55 -0
- data/tracks/python/exercises/secret-handshake/README.md +46 -0
- data/tracks/python/exercises/series/README.md +38 -0
- data/tracks/python/exercises/sieve/README.md +45 -0
- data/tracks/python/exercises/simple-cipher/README.md +101 -0
- data/tracks/python/exercises/space-age/README.md +35 -0
- data/tracks/python/exercises/strain/README.md +51 -0
- data/tracks/python/exercises/sublist/README.md +32 -0
- data/tracks/python/exercises/sum-of-multiples/README.md +29 -0
- data/tracks/python/exercises/tournament/README.md +79 -0
- data/tracks/python/exercises/transpose/README.md +76 -0
- data/tracks/python/exercises/triangle/README.md +37 -0
- data/tracks/python/exercises/trinary/README.md +39 -0
- data/tracks/python/exercises/twelve-days/README.md +46 -0
- data/tracks/python/exercises/variable-length-quantity/README.md +50 -0
- data/tracks/python/exercises/word-count/README.md +30 -0
- data/tracks/python/exercises/word-search/README.md +41 -0
- data/tracks/python/exercises/wordy/README.md +74 -0
- data/tracks/python/exercises/zebra-puzzle/README.md +43 -0
- data/tracks/python/test/check-exercises.py +2 -3
- data/tracks/r/config.json +0 -2
- data/tracks/ruby/.travis.yml +1 -1
- data/tracks/ruby/config/exercise_readme.go.tmpl +16 -0
- data/tracks/ruby/config.json +265 -4
- data/tracks/ruby/exercises/accumulate/README.md +76 -0
- data/tracks/ruby/exercises/acronym/README.md +41 -0
- data/tracks/ruby/exercises/all-your-base/README.md +61 -0
- data/tracks/ruby/exercises/allergies/README.md +63 -0
- data/tracks/ruby/exercises/alphametics/README.md +61 -0
- data/tracks/ruby/exercises/anagram/README.md +39 -0
- data/tracks/ruby/exercises/atbash-cipher/README.md +60 -0
- data/tracks/ruby/exercises/beer-song/README.md +353 -0
- data/tracks/ruby/exercises/binary/README.md +61 -0
- data/tracks/ruby/exercises/binary-search/README.md +67 -0
- data/tracks/ruby/exercises/binary-search-tree/README.md +86 -0
- data/tracks/ruby/exercises/bob/README.md +44 -0
- data/tracks/ruby/exercises/bowling/README.md +79 -0
- data/tracks/ruby/exercises/bracket-push/README.md +36 -0
- data/tracks/ruby/exercises/circular-buffer/README.md +76 -0
- data/tracks/ruby/exercises/clock/README.md +39 -0
- data/tracks/ruby/exercises/collatz-conjecture/README.md +59 -0
- data/tracks/ruby/exercises/connect/README.md +60 -0
- data/tracks/ruby/exercises/crypto-square/README.md +100 -0
- data/tracks/ruby/exercises/custom-set/README.md +37 -0
- data/tracks/ruby/exercises/diamond/README.md +85 -0
- data/tracks/ruby/exercises/difference-of-squares/README.md +45 -0
- data/tracks/ruby/exercises/dominoes/README.md +44 -0
- data/tracks/ruby/exercises/etl/README.md +77 -0
- data/tracks/ruby/exercises/flatten-array/README.md +44 -0
- data/tracks/ruby/exercises/food-chain/README.md +96 -0
- data/tracks/ruby/exercises/gigasecond/README.md +37 -0
- data/tracks/ruby/exercises/grade-school/README.md +68 -0
- data/tracks/ruby/exercises/grains/README.md +60 -0
- data/tracks/ruby/exercises/hamming/README.md +68 -0
- data/tracks/ruby/exercises/hello-world/README.md +47 -0
- data/tracks/ruby/exercises/hexadecimal/README.md +40 -0
- data/tracks/ruby/exercises/house/README.md +139 -0
- data/tracks/ruby/exercises/isogram/README.md +45 -0
- data/tracks/ruby/exercises/kindergarten-garden/README.md +92 -0
- data/tracks/ruby/exercises/largest-series-product/README.md +46 -0
- data/tracks/ruby/exercises/leap/README.md +59 -0
- data/tracks/ruby/exercises/linked-list/README.md +60 -0
- data/tracks/ruby/exercises/list-ops/README.md +36 -0
- data/tracks/ruby/exercises/luhn/README.md +97 -0
- data/tracks/ruby/exercises/matrix/README.md +71 -0
- data/tracks/ruby/exercises/meetup/README.md +56 -0
- data/tracks/ruby/exercises/minesweeper/README.md +56 -0
- data/tracks/ruby/exercises/nth-prime/README.md +41 -0
- data/tracks/ruby/exercises/nucleotide-count/README.md +59 -0
- data/tracks/ruby/exercises/ocr-numbers/README.md +111 -0
- data/tracks/ruby/exercises/octal/README.md +75 -0
- data/tracks/ruby/exercises/palindrome-products/README.md +66 -0
- data/tracks/ruby/exercises/pangram/README.md +41 -0
- data/tracks/ruby/exercises/pascals-triangle/README.md +47 -0
- data/tracks/ruby/exercises/perfect-numbers/README.md +50 -0
- data/tracks/ruby/exercises/phone-number/README.md +60 -0
- data/tracks/ruby/exercises/pig-latin/README.md +50 -0
- data/tracks/ruby/exercises/point-mutations/README.md +67 -0
- data/tracks/ruby/exercises/poker/README.md +38 -0
- data/tracks/ruby/exercises/prime-factors/README.md +62 -0
- data/tracks/ruby/exercises/protein-translation/README.md +75 -0
- data/tracks/ruby/exercises/proverb/README.md +44 -0
- data/tracks/ruby/exercises/pythagorean-triplet/README.md +50 -0
- data/tracks/ruby/exercises/queen-attack/README.md +59 -0
- data/tracks/ruby/exercises/rail-fence-cipher/README.md +86 -0
- data/tracks/ruby/exercises/raindrops/README.md +50 -0
- data/tracks/ruby/exercises/rna-transcription/README.md +51 -0
- data/tracks/ruby/exercises/robot-name/README.md +57 -0
- data/tracks/ruby/exercises/robot-simulator/README.md +60 -0
- data/tracks/ruby/exercises/roman-numerals/README.md +75 -0
- data/tracks/ruby/exercises/run-length-encoding/README.md +56 -0
- data/tracks/ruby/exercises/saddle-points/README.md +59 -0
- data/tracks/ruby/exercises/say/README.md +95 -0
- data/tracks/ruby/exercises/scale-generator/README.md +86 -0
- data/tracks/ruby/exercises/scrabble-score/README.md +70 -0
- data/tracks/ruby/exercises/secret-handshake/README.md +61 -0
- data/tracks/ruby/exercises/series/README.md +53 -0
- data/tracks/ruby/exercises/sieve/README.md +60 -0
- data/tracks/ruby/exercises/simple-cipher/README.md +116 -0
- data/tracks/ruby/exercises/simple-linked-list/README.md +54 -0
- data/tracks/ruby/exercises/space-age/README.md +50 -0
- data/tracks/ruby/exercises/strain/README.md +66 -0
- data/tracks/ruby/exercises/sum-of-multiples/README.md +44 -0
- data/tracks/ruby/exercises/tournament/README.md +94 -0
- data/tracks/ruby/exercises/transpose/README.md +91 -0
- data/tracks/ruby/exercises/triangle/README.md +52 -0
- data/tracks/ruby/exercises/trinary/README.md +54 -0
- data/tracks/ruby/exercises/twelve-days/README.md +61 -0
- data/tracks/ruby/exercises/two-bucket/README.md +62 -0
- data/tracks/ruby/exercises/word-count/README.md +45 -0
- data/tracks/ruby/exercises/wordy/README.md +89 -0
- data/tracks/rust/README.md +3 -3
- data/tracks/rust/_test/WINDOWS_README.md +44 -0
- data/tracks/rust/config.json +9 -2
- data/tracks/rust/exercises/pig-latin/Cargo-example.toml +8 -0
- data/tracks/rust/exercises/pig-latin/Cargo.lock +4 -0
- data/tracks/rust/exercises/pig-latin/Cargo.toml +6 -0
- data/tracks/rust/exercises/pig-latin/README.md +56 -0
- data/tracks/rust/exercises/pig-latin/example.rs +28 -0
- data/tracks/rust/exercises/pig-latin/tests/pig-latin.rs +120 -0
- data/tracks/rust/problem_ordering.md +2 -2
- data/tracks/sml/config.json +0 -2
- data/tracks/swift/config/exercise_readme.go.tmpl +16 -0
- data/tracks/swift/config.json +304 -79
- data/tracks/swift/exercises/accumulate/README.md +43 -0
- data/tracks/swift/exercises/acronym/README.md +23 -0
- data/tracks/swift/exercises/all-your-base/README.md +43 -0
- data/tracks/swift/exercises/allergies/README.md +45 -0
- data/tracks/swift/exercises/anagram/README.md +21 -0
- data/tracks/swift/exercises/atbash-cipher/README.md +42 -0
- data/tracks/swift/exercises/beer-song/README.md +335 -0
- data/tracks/swift/exercises/binary/README.md +43 -0
- data/tracks/swift/exercises/binary-search/README.md +49 -0
- data/tracks/swift/exercises/binary-search-tree/README.md +68 -0
- data/tracks/swift/exercises/bob/README.md +26 -0
- data/tracks/swift/exercises/bowling/README.md +61 -0
- data/tracks/swift/exercises/bracket-push/README.md +18 -0
- data/tracks/swift/exercises/clock/README.md +21 -0
- data/tracks/swift/exercises/crypto-square/README.md +82 -0
- data/tracks/swift/exercises/custom-set/README.md +19 -0
- data/tracks/swift/exercises/difference-of-squares/README.md +27 -0
- data/tracks/swift/exercises/dominoes/README.md +26 -0
- data/tracks/swift/exercises/etl/README.md +59 -0
- data/tracks/swift/exercises/flatten-array/README.md +26 -0
- data/tracks/swift/exercises/food-chain/README.md +78 -0
- data/tracks/swift/exercises/gigasecond/README.md +19 -0
- data/tracks/swift/exercises/grade-school/README.md +50 -0
- data/tracks/swift/exercises/grains/README.md +42 -0
- data/tracks/swift/exercises/hamming/README.md +50 -0
- data/tracks/swift/exercises/hello-world/README.md +29 -0
- data/tracks/swift/exercises/hexadecimal/README.md +22 -0
- data/tracks/swift/exercises/house/README.md +121 -0
- data/tracks/swift/exercises/isogram/README.md +27 -0
- data/tracks/swift/exercises/kindergarten-garden/README.md +74 -0
- data/tracks/swift/exercises/largest-series-product/README.md +28 -0
- data/tracks/swift/exercises/leap/README.md +41 -0
- data/tracks/swift/exercises/linked-list/README.md +42 -0
- data/tracks/swift/exercises/luhn/README.md +79 -0
- data/tracks/swift/exercises/matrix/README.md +53 -0
- data/tracks/swift/exercises/meetup/README.md +38 -0
- data/tracks/swift/exercises/minesweeper/README.md +38 -0
- data/tracks/swift/exercises/nth-prime/README.md +23 -0
- data/tracks/swift/exercises/nucleotide-count/README.md +41 -0
- data/tracks/swift/exercises/ocr-numbers/README.md +93 -0
- data/tracks/swift/exercises/octal/README.md +57 -0
- data/tracks/swift/exercises/palindrome-products/README.md +48 -0
- data/tracks/swift/exercises/pangram/README.md +23 -0
- data/tracks/swift/exercises/pascals-triangle/README.md +29 -0
- data/tracks/swift/exercises/perfect-numbers/README.md +32 -0
- data/tracks/swift/exercises/phone-number/README.md +42 -0
- data/tracks/swift/exercises/pig-latin/README.md +32 -0
- data/tracks/swift/exercises/poker/README.md +20 -0
- data/tracks/swift/exercises/prime-factors/README.md +44 -0
- data/tracks/swift/exercises/pythagorean-triplet/README.md +32 -0
- data/tracks/swift/exercises/queen-attack/README.md +41 -0
- data/tracks/swift/exercises/raindrops/README.md +32 -0
- data/tracks/swift/exercises/rna-transcription/README.md +33 -0
- data/tracks/swift/exercises/robot-name/README.md +30 -0
- data/tracks/swift/exercises/robot-simulator/README.md +42 -0
- data/tracks/swift/exercises/roman-numerals/README.md +57 -0
- data/tracks/swift/exercises/run-length-encoding/README.md +38 -0
- data/tracks/swift/exercises/saddle-points/README.md +41 -0
- data/tracks/swift/exercises/scrabble-score/README.md +52 -0
- data/tracks/swift/exercises/secret-handshake/README.md +43 -0
- data/tracks/swift/exercises/series/README.md +35 -0
- data/tracks/swift/exercises/sieve/README.md +42 -0
- data/tracks/swift/exercises/simple-cipher/README.md +98 -0
- data/tracks/swift/exercises/simple-linked-list/README.md +36 -0
- data/tracks/swift/exercises/space-age/README.md +32 -0
- data/tracks/swift/exercises/strain/README.md +48 -0
- data/tracks/swift/exercises/sublist/README.md +29 -0
- data/tracks/swift/exercises/sum-of-multiples/README.md +26 -0
- data/tracks/swift/exercises/tournament/README.md +76 -0
- data/tracks/swift/exercises/transpose/README.md +73 -0
- data/tracks/swift/exercises/triangle/README.md +34 -0
- data/tracks/swift/exercises/trinary/README.md +36 -0
- data/tracks/swift/exercises/twelve-days/README.md +43 -0
- data/tracks/swift/exercises/word-count/README.md +27 -0
- data/tracks/swift/exercises/wordy/README.md +71 -0
- data/tracks/typescript/README.md +1 -1
- data/tracks/typescript/config.json +63 -3
- data/tracks/vimscript/config.json +0 -2
- metadata +371 -40
- data/tracks/erlang/exercises/atbash-cipher/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/bank-account/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/beer-song/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/bob/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/circular-buffer/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/clock/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/collatz-conjecture/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/difference-of-squares/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/etl/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/gigasecond/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/grade-school/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/grains/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/hamming/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/hello-world/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/largest-series-product/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/leap/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/luhn/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/meetup/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/nucleotide-count/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/parallel-letter-frequency/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/phone-number/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/rna-transcription/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/robot-simulator/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/roman-numerals/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/rotational-cipher/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/scrabble-score/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/series/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/space-age/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/spiral-matrix/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/strain/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/sum-of-multiples/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/triangle/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/word-count/.meta/readme.go.tmpl +0 -17
- data/tracks/erlang/exercises/zipper/.meta/readme.go.tmpl +0 -17
@@ -0,0 +1,36 @@
|
|
1
|
+
# Bracket Push
|
2
|
+
|
3
|
+
Given a string containing brackets `[]`, braces `{}` and parentheses `()`,
|
4
|
+
verify that all the pairs are matched and nested correctly.
|
5
|
+
|
6
|
+
* * * *
|
7
|
+
|
8
|
+
For installation and learning resources, refer to the
|
9
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
10
|
+
|
11
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
12
|
+
terminal window and run the following command to install minitest:
|
13
|
+
|
14
|
+
gem install minitest
|
15
|
+
|
16
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
17
|
+
the test file, or note the alternative instruction, below, for running
|
18
|
+
the test file.
|
19
|
+
|
20
|
+
In order to run the test, you can run the test file from the exercise
|
21
|
+
directory. For example, if the test suite is called
|
22
|
+
`hello_world_test.rb`, you can run the following command:
|
23
|
+
|
24
|
+
ruby hello_world_test.rb
|
25
|
+
|
26
|
+
To include color from the command line:
|
27
|
+
|
28
|
+
ruby -r minitest/pride hello_world_test.rb
|
29
|
+
|
30
|
+
|
31
|
+
## Source
|
32
|
+
|
33
|
+
Ginna Baker
|
34
|
+
|
35
|
+
## Submitting Incomplete Solutions
|
36
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# Circular Buffer
|
2
|
+
|
3
|
+
A circular buffer, cyclic buffer or ring buffer is a data structure that
|
4
|
+
uses a single, fixed-size buffer as if it were connected end-to-end.
|
5
|
+
|
6
|
+
A circular buffer first starts empty and of some predefined length. For
|
7
|
+
example, this is a 7-element buffer:
|
8
|
+
|
9
|
+
[ ][ ][ ][ ][ ][ ][ ]
|
10
|
+
|
11
|
+
Assume that a 1 is written into the middle of the buffer (exact starting
|
12
|
+
location does not matter in a circular buffer):
|
13
|
+
|
14
|
+
[ ][ ][ ][1][ ][ ][ ]
|
15
|
+
|
16
|
+
Then assume that two more elements are added — 2 & 3 — which get
|
17
|
+
appended after the 1:
|
18
|
+
|
19
|
+
[ ][ ][ ][1][2][3][ ]
|
20
|
+
|
21
|
+
If two elements are then removed from the buffer, the oldest values
|
22
|
+
inside the buffer are removed. The two elements removed, in this case,
|
23
|
+
are 1 & 2, leaving the buffer with just a 3:
|
24
|
+
|
25
|
+
[ ][ ][ ][ ][ ][3][ ]
|
26
|
+
|
27
|
+
If the buffer has 7 elements then it is completely full:
|
28
|
+
|
29
|
+
[6][7][8][9][3][4][5]
|
30
|
+
|
31
|
+
When the buffer is full an error will be raised, alerting the client
|
32
|
+
that further writes are blocked until a slot becomes free.
|
33
|
+
|
34
|
+
The client can opt to overwrite the oldest data with a forced write. In
|
35
|
+
this case, two more elements — A & B — are added and they overwrite the
|
36
|
+
3 & 4:
|
37
|
+
|
38
|
+
[6][7][8][9][A][B][5]
|
39
|
+
|
40
|
+
Finally, if two elements are now removed then what would be returned is
|
41
|
+
not 3 & 4 but 5 & 6 because A & B overwrote the 3 & the 4 yielding the
|
42
|
+
buffer with:
|
43
|
+
|
44
|
+
[ ][7][8][9][A][B][ ]
|
45
|
+
|
46
|
+
* * * *
|
47
|
+
|
48
|
+
For installation and learning resources, refer to the
|
49
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
50
|
+
|
51
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
52
|
+
terminal window and run the following command to install minitest:
|
53
|
+
|
54
|
+
gem install minitest
|
55
|
+
|
56
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
57
|
+
the test file, or note the alternative instruction, below, for running
|
58
|
+
the test file.
|
59
|
+
|
60
|
+
In order to run the test, you can run the test file from the exercise
|
61
|
+
directory. For example, if the test suite is called
|
62
|
+
`hello_world_test.rb`, you can run the following command:
|
63
|
+
|
64
|
+
ruby hello_world_test.rb
|
65
|
+
|
66
|
+
To include color from the command line:
|
67
|
+
|
68
|
+
ruby -r minitest/pride hello_world_test.rb
|
69
|
+
|
70
|
+
|
71
|
+
## Source
|
72
|
+
|
73
|
+
Wikipedia [http://en.wikipedia.org/wiki/Circular_buffer](http://en.wikipedia.org/wiki/Circular_buffer)
|
74
|
+
|
75
|
+
## Submitting Incomplete Solutions
|
76
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Clock
|
2
|
+
|
3
|
+
Implement a clock that handles times without dates.
|
4
|
+
|
5
|
+
You should be able to add and subtract minutes to it.
|
6
|
+
|
7
|
+
Two clocks that represent the same time should be equal to each other.
|
8
|
+
|
9
|
+
* * * *
|
10
|
+
|
11
|
+
For installation and learning resources, refer to the
|
12
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
13
|
+
|
14
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
15
|
+
terminal window and run the following command to install minitest:
|
16
|
+
|
17
|
+
gem install minitest
|
18
|
+
|
19
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
20
|
+
the test file, or note the alternative instruction, below, for running
|
21
|
+
the test file.
|
22
|
+
|
23
|
+
In order to run the test, you can run the test file from the exercise
|
24
|
+
directory. For example, if the test suite is called
|
25
|
+
`hello_world_test.rb`, you can run the following command:
|
26
|
+
|
27
|
+
ruby hello_world_test.rb
|
28
|
+
|
29
|
+
To include color from the command line:
|
30
|
+
|
31
|
+
ruby -r minitest/pride hello_world_test.rb
|
32
|
+
|
33
|
+
|
34
|
+
## Source
|
35
|
+
|
36
|
+
Pairing session with Erin Drummond [https://twitter.com/ebdrummond](https://twitter.com/ebdrummond)
|
37
|
+
|
38
|
+
## Submitting Incomplete Solutions
|
39
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Collatz Conjecture
|
2
|
+
|
3
|
+
The Collatz Conjecture or 3x+1 problem can be summarized as follows:
|
4
|
+
|
5
|
+
Take any positive integer n. If n is even, divide n by 2 to get n / 2. If n is
|
6
|
+
odd, multiply n by 3 and add 1 to get 3n + 1. Repeat the process indefinitely.
|
7
|
+
The conjecture states that no matter which number you start with, you will
|
8
|
+
always reach 1 eventually.
|
9
|
+
|
10
|
+
Given a number n, return the number of steps required to reach 1.
|
11
|
+
|
12
|
+
## Examples
|
13
|
+
Starting with n = 12, the steps would be as follows:
|
14
|
+
|
15
|
+
0. 12
|
16
|
+
1. 6
|
17
|
+
2. 3
|
18
|
+
3. 10
|
19
|
+
4. 5
|
20
|
+
5. 16
|
21
|
+
6. 8
|
22
|
+
7. 4
|
23
|
+
8. 2
|
24
|
+
9. 1
|
25
|
+
|
26
|
+
Resulting in 9 steps. So for input n = 12, the return value would be 9.
|
27
|
+
|
28
|
+
|
29
|
+
* * * *
|
30
|
+
|
31
|
+
For installation and learning resources, refer to the
|
32
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
33
|
+
|
34
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
35
|
+
terminal window and run the following command to install minitest:
|
36
|
+
|
37
|
+
gem install minitest
|
38
|
+
|
39
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
40
|
+
the test file, or note the alternative instruction, below, for running
|
41
|
+
the test file.
|
42
|
+
|
43
|
+
In order to run the test, you can run the test file from the exercise
|
44
|
+
directory. For example, if the test suite is called
|
45
|
+
`hello_world_test.rb`, you can run the following command:
|
46
|
+
|
47
|
+
ruby hello_world_test.rb
|
48
|
+
|
49
|
+
To include color from the command line:
|
50
|
+
|
51
|
+
ruby -r minitest/pride hello_world_test.rb
|
52
|
+
|
53
|
+
|
54
|
+
## Source
|
55
|
+
|
56
|
+
An unsolved problem in mathematics named after mathematician Lothar Collatz [https://en.wikipedia.org/wiki/3x_%2B_1_problem](https://en.wikipedia.org/wiki/3x_%2B_1_problem)
|
57
|
+
|
58
|
+
## Submitting Incomplete Solutions
|
59
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Connect
|
2
|
+
|
3
|
+
Compute the result for a game of Hex / Polygon.
|
4
|
+
|
5
|
+
The abstract boardgame known as
|
6
|
+
[Hex](https://en.wikipedia.org/wiki/Hex_%28board_game%29) / Polygon /
|
7
|
+
CON-TAC-TIX is quite simple in rules, though complex in practice. Two players
|
8
|
+
place stones on a rhombus with hexagonal fields. The player to connect his/her
|
9
|
+
stones to the opposite side first wins. The four sides of the rhombus are
|
10
|
+
divided between the two players (i.e. one player gets assigned a side and the
|
11
|
+
side directly opposite it and the other player gets assigned the two other
|
12
|
+
sides).
|
13
|
+
|
14
|
+
Your goal is to build a program that given a simple representation of a board
|
15
|
+
computes the winner (or lack thereof). Note that all games need not be "fair".
|
16
|
+
(For example, players may have mismatched piece counts.)
|
17
|
+
|
18
|
+
The boards look like this (with spaces added for readability, which won't be in
|
19
|
+
the representation passed to your code):
|
20
|
+
|
21
|
+
```
|
22
|
+
. O . X .
|
23
|
+
. X X O .
|
24
|
+
O O O X .
|
25
|
+
. X O X O
|
26
|
+
X O O O X
|
27
|
+
```
|
28
|
+
|
29
|
+
"Player `O`" plays from top to bottom, "Player `X`" plays from left to right. In
|
30
|
+
the above example `O` has made a connection from left to right but nobody has
|
31
|
+
won since `O` didn't connect top and bottom.
|
32
|
+
|
33
|
+
* * * *
|
34
|
+
|
35
|
+
For installation and learning resources, refer to the
|
36
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
37
|
+
|
38
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
39
|
+
terminal window and run the following command to install minitest:
|
40
|
+
|
41
|
+
gem install minitest
|
42
|
+
|
43
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
44
|
+
the test file, or note the alternative instruction, below, for running
|
45
|
+
the test file.
|
46
|
+
|
47
|
+
In order to run the test, you can run the test file from the exercise
|
48
|
+
directory. For example, if the test suite is called
|
49
|
+
`hello_world_test.rb`, you can run the following command:
|
50
|
+
|
51
|
+
ruby hello_world_test.rb
|
52
|
+
|
53
|
+
To include color from the command line:
|
54
|
+
|
55
|
+
ruby -r minitest/pride hello_world_test.rb
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
## Submitting Incomplete Solutions
|
60
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# Crypto Square
|
2
|
+
|
3
|
+
Implement the classic method for composing secret messages called a square code.
|
4
|
+
|
5
|
+
Given an English text, output the encoded version of that text.
|
6
|
+
|
7
|
+
First, the input is normalized: the spaces and punctuation are removed
|
8
|
+
from the English text and the message is downcased.
|
9
|
+
|
10
|
+
Then, the normalized characters are broken into rows. These rows can be
|
11
|
+
regarded as forming a rectangle when printed with intervening newlines.
|
12
|
+
|
13
|
+
For example, the sentence
|
14
|
+
|
15
|
+
> If man was meant to stay on the ground, god would have given us roots.
|
16
|
+
|
17
|
+
is normalized to:
|
18
|
+
|
19
|
+
> ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots
|
20
|
+
|
21
|
+
The plaintext should be organized in to a rectangle. The size of the
|
22
|
+
rectangle (`r x c`) should be decided by the length of the message,
|
23
|
+
such that `c >= r` and `c - r <= 1`, where `c` is the number of columns
|
24
|
+
and `r` is the number of rows.
|
25
|
+
|
26
|
+
Our normalized text is 54 characters long, dictating a rectangle with
|
27
|
+
`c = 8` and `r = 7`:
|
28
|
+
|
29
|
+
```plain
|
30
|
+
ifmanwas
|
31
|
+
meanttos
|
32
|
+
tayonthe
|
33
|
+
groundgo
|
34
|
+
dwouldha
|
35
|
+
vegivenu
|
36
|
+
sroots
|
37
|
+
```
|
38
|
+
|
39
|
+
The coded message is obtained by reading down the columns going left to
|
40
|
+
right.
|
41
|
+
|
42
|
+
The message above is coded as:
|
43
|
+
|
44
|
+
```plain
|
45
|
+
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
|
46
|
+
```
|
47
|
+
|
48
|
+
Output the encoded text in chunks. Phrases that fill perfect squares
|
49
|
+
`(r X r)` should be output in `r`-length chunks separated by spaces.
|
50
|
+
Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.
|
51
|
+
|
52
|
+
```plain
|
53
|
+
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
|
54
|
+
```
|
55
|
+
|
56
|
+
Notice that were we to stack these, we could visually decode the
|
57
|
+
cyphertext back in to the original message:
|
58
|
+
|
59
|
+
```plain
|
60
|
+
imtgdvs
|
61
|
+
fearwer
|
62
|
+
mayoogo
|
63
|
+
anouuio
|
64
|
+
ntnnlvt
|
65
|
+
wttddes
|
66
|
+
aohghn
|
67
|
+
sseoau
|
68
|
+
```
|
69
|
+
|
70
|
+
* * * *
|
71
|
+
|
72
|
+
For installation and learning resources, refer to the
|
73
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
74
|
+
|
75
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
76
|
+
terminal window and run the following command to install minitest:
|
77
|
+
|
78
|
+
gem install minitest
|
79
|
+
|
80
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
81
|
+
the test file, or note the alternative instruction, below, for running
|
82
|
+
the test file.
|
83
|
+
|
84
|
+
In order to run the test, you can run the test file from the exercise
|
85
|
+
directory. For example, if the test suite is called
|
86
|
+
`hello_world_test.rb`, you can run the following command:
|
87
|
+
|
88
|
+
ruby hello_world_test.rb
|
89
|
+
|
90
|
+
To include color from the command line:
|
91
|
+
|
92
|
+
ruby -r minitest/pride hello_world_test.rb
|
93
|
+
|
94
|
+
|
95
|
+
## Source
|
96
|
+
|
97
|
+
J Dalbey's Programming Practice problems [http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html](http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html)
|
98
|
+
|
99
|
+
## Submitting Incomplete Solutions
|
100
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Custom Set
|
2
|
+
|
3
|
+
Create a custom set type.
|
4
|
+
|
5
|
+
Sometimes it is necessary to define a custom data structure of some
|
6
|
+
type, like a set. In this exercise you will define your own set. How it
|
7
|
+
works internally doesn't matter, as long as it behaves like a set of
|
8
|
+
unique elements.
|
9
|
+
|
10
|
+
* * * *
|
11
|
+
|
12
|
+
For installation and learning resources, refer to the
|
13
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
14
|
+
|
15
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
16
|
+
terminal window and run the following command to install minitest:
|
17
|
+
|
18
|
+
gem install minitest
|
19
|
+
|
20
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
21
|
+
the test file, or note the alternative instruction, below, for running
|
22
|
+
the test file.
|
23
|
+
|
24
|
+
In order to run the test, you can run the test file from the exercise
|
25
|
+
directory. For example, if the test suite is called
|
26
|
+
`hello_world_test.rb`, you can run the following command:
|
27
|
+
|
28
|
+
ruby hello_world_test.rb
|
29
|
+
|
30
|
+
To include color from the command line:
|
31
|
+
|
32
|
+
ruby -r minitest/pride hello_world_test.rb
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
## Submitting Incomplete Solutions
|
37
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# Diamond
|
2
|
+
|
3
|
+
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
+
shape. Given a letter, it prints a diamond starting with 'A', with the
|
5
|
+
supplied letter at the widest point.
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
* The first row contains one 'A'.
|
10
|
+
* The last row contains one 'A'.
|
11
|
+
* All rows, except the first and last, have exactly two identical letters.
|
12
|
+
* All rows have as many trailing spaces as leading spaces. (This might be 0).
|
13
|
+
* The diamond is horizontally symmetric.
|
14
|
+
* The diamond is vertically symmetric.
|
15
|
+
* The diamond has a square shape (width equals height).
|
16
|
+
* The letters form a diamond shape.
|
17
|
+
* The top half has the letters in ascending order.
|
18
|
+
* The bottom half has the letters in descending order.
|
19
|
+
* The four corners (containing the spaces) are triangles.
|
20
|
+
|
21
|
+
## Examples
|
22
|
+
|
23
|
+
In the following examples, spaces are indicated by `·` characters.
|
24
|
+
|
25
|
+
Diamond for letter 'A':
|
26
|
+
|
27
|
+
```plain
|
28
|
+
A
|
29
|
+
```
|
30
|
+
|
31
|
+
Diamond for letter 'C':
|
32
|
+
|
33
|
+
```plain
|
34
|
+
··A··
|
35
|
+
·B·B·
|
36
|
+
C···C
|
37
|
+
·B·B·
|
38
|
+
··A··
|
39
|
+
```
|
40
|
+
|
41
|
+
Diamond for letter 'E':
|
42
|
+
|
43
|
+
```plain
|
44
|
+
····A····
|
45
|
+
···B·B···
|
46
|
+
··C···C··
|
47
|
+
·D·····D·
|
48
|
+
E·······E
|
49
|
+
·D·····D·
|
50
|
+
··C···C··
|
51
|
+
···B·B···
|
52
|
+
····A····
|
53
|
+
```
|
54
|
+
|
55
|
+
* * * *
|
56
|
+
|
57
|
+
For installation and learning resources, refer to the
|
58
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
59
|
+
|
60
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
61
|
+
terminal window and run the following command to install minitest:
|
62
|
+
|
63
|
+
gem install minitest
|
64
|
+
|
65
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
66
|
+
the test file, or note the alternative instruction, below, for running
|
67
|
+
the test file.
|
68
|
+
|
69
|
+
In order to run the test, you can run the test file from the exercise
|
70
|
+
directory. For example, if the test suite is called
|
71
|
+
`hello_world_test.rb`, you can run the following command:
|
72
|
+
|
73
|
+
ruby hello_world_test.rb
|
74
|
+
|
75
|
+
To include color from the command line:
|
76
|
+
|
77
|
+
ruby -r minitest/pride hello_world_test.rb
|
78
|
+
|
79
|
+
|
80
|
+
## Source
|
81
|
+
|
82
|
+
Seb Rose [http://claysnow.co.uk/recycling-tests-in-tdd/](http://claysnow.co.uk/recycling-tests-in-tdd/)
|
83
|
+
|
84
|
+
## Submitting Incomplete Solutions
|
85
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Difference Of Squares
|
2
|
+
|
3
|
+
Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
|
4
|
+
|
5
|
+
The square of the sum of the first ten natural numbers is
|
6
|
+
(1 + 2 + ... + 10)² = 55² = 3025.
|
7
|
+
|
8
|
+
The sum of the squares of the first ten natural numbers is
|
9
|
+
1² + 2² + ... + 10² = 385.
|
10
|
+
|
11
|
+
Hence the difference between the square of the sum of the first
|
12
|
+
ten natural numbers and the sum of the squares of the first ten
|
13
|
+
natural numbers is 3025 - 385 = 2640.
|
14
|
+
|
15
|
+
* * * *
|
16
|
+
|
17
|
+
For installation and learning resources, refer to the
|
18
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
19
|
+
|
20
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
21
|
+
terminal window and run the following command to install minitest:
|
22
|
+
|
23
|
+
gem install minitest
|
24
|
+
|
25
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
26
|
+
the test file, or note the alternative instruction, below, for running
|
27
|
+
the test file.
|
28
|
+
|
29
|
+
In order to run the test, you can run the test file from the exercise
|
30
|
+
directory. For example, if the test suite is called
|
31
|
+
`hello_world_test.rb`, you can run the following command:
|
32
|
+
|
33
|
+
ruby hello_world_test.rb
|
34
|
+
|
35
|
+
To include color from the command line:
|
36
|
+
|
37
|
+
ruby -r minitest/pride hello_world_test.rb
|
38
|
+
|
39
|
+
|
40
|
+
## Source
|
41
|
+
|
42
|
+
Problem 6 at Project Euler [http://projecteuler.net/problem=6](http://projecteuler.net/problem=6)
|
43
|
+
|
44
|
+
## Submitting Incomplete Solutions
|
45
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Dominoes
|
2
|
+
|
3
|
+
Make a chain of dominoes.
|
4
|
+
|
5
|
+
Compute a way to order a given set of dominoes in such a way that they form a
|
6
|
+
correct domino chain (the dots on one half of a stone match the dots on the
|
7
|
+
neighbouring half of an adjacent stone) and that dots on the halfs of the stones
|
8
|
+
which don't have a neighbour (the first and last stone) match each other.
|
9
|
+
|
10
|
+
For example given the stones `21`, `23` and `13` you should compute something
|
11
|
+
like `12 23 31` or `32 21 13` or `13 32 21` etc, where the first and last numbers are the same.
|
12
|
+
|
13
|
+
For stones 12, 41 and 23 the resulting chain is not valid: 41 12 23's first and last numbers are not the same. 4 != 3
|
14
|
+
|
15
|
+
Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used.
|
16
|
+
|
17
|
+
* * * *
|
18
|
+
|
19
|
+
For installation and learning resources, refer to the
|
20
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
21
|
+
|
22
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
23
|
+
terminal window and run the following command to install minitest:
|
24
|
+
|
25
|
+
gem install minitest
|
26
|
+
|
27
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
28
|
+
the test file, or note the alternative instruction, below, for running
|
29
|
+
the test file.
|
30
|
+
|
31
|
+
In order to run the test, you can run the test file from the exercise
|
32
|
+
directory. For example, if the test suite is called
|
33
|
+
`hello_world_test.rb`, you can run the following command:
|
34
|
+
|
35
|
+
ruby hello_world_test.rb
|
36
|
+
|
37
|
+
To include color from the command line:
|
38
|
+
|
39
|
+
ruby -r minitest/pride hello_world_test.rb
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
## Submitting Incomplete Solutions
|
44
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# Etl
|
2
|
+
|
3
|
+
We are going to do the `Transform` step of an Extract-Transform-Load.
|
4
|
+
|
5
|
+
### ETL
|
6
|
+
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
|
7
|
+
we're going to migrate this."
|
8
|
+
|
9
|
+
(Typically, this is followed by, "We're only going to need to run this
|
10
|
+
once." That's then typically followed by much forehead slapping and
|
11
|
+
moaning about how stupid we could possibly be.)
|
12
|
+
|
13
|
+
### The goal
|
14
|
+
We're going to extract some scrabble scores from a legacy system.
|
15
|
+
|
16
|
+
The old system stored a list of letters per score:
|
17
|
+
|
18
|
+
- 1 point: "A", "E", "I", "O", "U", "L", "N", "R", "S", "T",
|
19
|
+
- 2 points: "D", "G",
|
20
|
+
- 3 points: "B", "C", "M", "P",
|
21
|
+
- 4 points: "F", "H", "V", "W", "Y",
|
22
|
+
- 5 points: "K",
|
23
|
+
- 8 points: "J", "X",
|
24
|
+
- 10 points: "Q", "Z",
|
25
|
+
|
26
|
+
The shiny new scrabble system instead stores the score per letter, which
|
27
|
+
makes it much faster and easier to calculate the score for a word. It
|
28
|
+
also stores the letters in lower-case regardless of the case of the
|
29
|
+
input letters:
|
30
|
+
|
31
|
+
- "a" is worth 1 point.
|
32
|
+
- "b" is worth 3 points.
|
33
|
+
- "c" is worth 3 points.
|
34
|
+
- "d" is worth 2 points.
|
35
|
+
- Etc.
|
36
|
+
|
37
|
+
Your mission, should you choose to accept it, is to transform the legacy data
|
38
|
+
format to the shiny new format.
|
39
|
+
|
40
|
+
### Notes
|
41
|
+
|
42
|
+
A final note about scoring, Scrabble is played around the world in a
|
43
|
+
variety of languages, each with its own unique scoring table. For
|
44
|
+
example, an "E" is scored at 2 in the Māori-language version of the
|
45
|
+
game while being scored at 4 in the Hawaiian-language version.
|
46
|
+
|
47
|
+
* * * *
|
48
|
+
|
49
|
+
For installation and learning resources, refer to the
|
50
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
51
|
+
|
52
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
53
|
+
terminal window and run the following command to install minitest:
|
54
|
+
|
55
|
+
gem install minitest
|
56
|
+
|
57
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
58
|
+
the test file, or note the alternative instruction, below, for running
|
59
|
+
the test file.
|
60
|
+
|
61
|
+
In order to run the test, you can run the test file from the exercise
|
62
|
+
directory. For example, if the test suite is called
|
63
|
+
`hello_world_test.rb`, you can run the following command:
|
64
|
+
|
65
|
+
ruby hello_world_test.rb
|
66
|
+
|
67
|
+
To include color from the command line:
|
68
|
+
|
69
|
+
ruby -r minitest/pride hello_world_test.rb
|
70
|
+
|
71
|
+
|
72
|
+
## Source
|
73
|
+
|
74
|
+
The Jumpstart Lab team [http://jumpstartlab.com](http://jumpstartlab.com)
|
75
|
+
|
76
|
+
## Submitting Incomplete Solutions
|
77
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|