trackler 2.2.0.4 → 2.2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- 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,50 @@
|
|
1
|
+
# Space Age
|
2
|
+
|
3
|
+
Given an age in seconds, calculate how old someone would be on:
|
4
|
+
|
5
|
+
- Earth: orbital period 365.25 Earth days, or 31557600 seconds
|
6
|
+
- Mercury: orbital period 0.2408467 Earth years
|
7
|
+
- Venus: orbital period 0.61519726 Earth years
|
8
|
+
- Mars: orbital period 1.8808158 Earth years
|
9
|
+
- Jupiter: orbital period 11.862615 Earth years
|
10
|
+
- Saturn: orbital period 29.447498 Earth years
|
11
|
+
- Uranus: orbital period 84.016846 Earth years
|
12
|
+
- Neptune: orbital period 164.79132 Earth years
|
13
|
+
|
14
|
+
So if you were told someone were 1,000,000,000 seconds old, you should
|
15
|
+
be able to say that they're 31 Earth-years old.
|
16
|
+
|
17
|
+
If you're wondering why Pluto didn't make the cut, go watch [this
|
18
|
+
youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).
|
19
|
+
|
20
|
+
* * * *
|
21
|
+
|
22
|
+
For installation and learning resources, refer to the
|
23
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
24
|
+
|
25
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
26
|
+
terminal window and run the following command to install minitest:
|
27
|
+
|
28
|
+
gem install minitest
|
29
|
+
|
30
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
31
|
+
the test file, or note the alternative instruction, below, for running
|
32
|
+
the test file.
|
33
|
+
|
34
|
+
In order to run the test, you can run the test file from the exercise
|
35
|
+
directory. For example, if the test suite is called
|
36
|
+
`hello_world_test.rb`, you can run the following command:
|
37
|
+
|
38
|
+
ruby hello_world_test.rb
|
39
|
+
|
40
|
+
To include color from the command line:
|
41
|
+
|
42
|
+
ruby -r minitest/pride hello_world_test.rb
|
43
|
+
|
44
|
+
|
45
|
+
## Source
|
46
|
+
|
47
|
+
Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01)
|
48
|
+
|
49
|
+
## Submitting Incomplete Solutions
|
50
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Strain
|
2
|
+
|
3
|
+
Implement the `keep` and `discard` operation on collections. Given a collection
|
4
|
+
and a predicate on the collection's elements, `keep` returns a new collection
|
5
|
+
containing those elements where the predicate is true, while `discard` returns
|
6
|
+
a new collection containing those elements where the predicate is false.
|
7
|
+
|
8
|
+
For example, given the collection of numbers:
|
9
|
+
|
10
|
+
- 1, 2, 3, 4, 5
|
11
|
+
|
12
|
+
And the predicate:
|
13
|
+
|
14
|
+
- is the number even?
|
15
|
+
|
16
|
+
Then your keep operation should produce:
|
17
|
+
|
18
|
+
- 2, 4
|
19
|
+
|
20
|
+
While your discard operation should produce:
|
21
|
+
|
22
|
+
- 1, 3, 5
|
23
|
+
|
24
|
+
Note that the union of keep and discard is all the elements.
|
25
|
+
|
26
|
+
The functions may be called `keep` and `discard`, or they may need different
|
27
|
+
names in order to not clash with existing functions or concepts in your
|
28
|
+
language.
|
29
|
+
|
30
|
+
## Restrictions
|
31
|
+
|
32
|
+
Keep your hands off that filter/reject/whatchamacallit functionality
|
33
|
+
provided by your standard library! Solve this one yourself using other
|
34
|
+
basic tools instead.
|
35
|
+
|
36
|
+
* * * *
|
37
|
+
|
38
|
+
For installation and learning resources, refer to the
|
39
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
40
|
+
|
41
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
42
|
+
terminal window and run the following command to install minitest:
|
43
|
+
|
44
|
+
gem install minitest
|
45
|
+
|
46
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
47
|
+
the test file, or note the alternative instruction, below, for running
|
48
|
+
the test file.
|
49
|
+
|
50
|
+
In order to run the test, you can run the test file from the exercise
|
51
|
+
directory. For example, if the test suite is called
|
52
|
+
`hello_world_test.rb`, you can run the following command:
|
53
|
+
|
54
|
+
ruby hello_world_test.rb
|
55
|
+
|
56
|
+
To include color from the command line:
|
57
|
+
|
58
|
+
ruby -r minitest/pride hello_world_test.rb
|
59
|
+
|
60
|
+
|
61
|
+
## Source
|
62
|
+
|
63
|
+
Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2)
|
64
|
+
|
65
|
+
## Submitting Incomplete Solutions
|
66
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Sum Of Multiples
|
2
|
+
|
3
|
+
Given a number, find the sum of all the multiples of particular numbers up to
|
4
|
+
but not including that number.
|
5
|
+
|
6
|
+
If we list all the natural numbers up to but not including 20 that are
|
7
|
+
multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18.
|
8
|
+
|
9
|
+
The sum of these multiples is 78.
|
10
|
+
|
11
|
+
Given a number, find the sum of the multiples of a given set of numbers,
|
12
|
+
up to but not including that number.
|
13
|
+
|
14
|
+
* * * *
|
15
|
+
|
16
|
+
For installation and learning resources, refer to the
|
17
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
18
|
+
|
19
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
20
|
+
terminal window and run the following command to install minitest:
|
21
|
+
|
22
|
+
gem install minitest
|
23
|
+
|
24
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
25
|
+
the test file, or note the alternative instruction, below, for running
|
26
|
+
the test file.
|
27
|
+
|
28
|
+
In order to run the test, you can run the test file from the exercise
|
29
|
+
directory. For example, if the test suite is called
|
30
|
+
`hello_world_test.rb`, you can run the following command:
|
31
|
+
|
32
|
+
ruby hello_world_test.rb
|
33
|
+
|
34
|
+
To include color from the command line:
|
35
|
+
|
36
|
+
ruby -r minitest/pride hello_world_test.rb
|
37
|
+
|
38
|
+
|
39
|
+
## Source
|
40
|
+
|
41
|
+
A variation on Problem 1 at Project Euler [http://projecteuler.net/problem=1](http://projecteuler.net/problem=1)
|
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,94 @@
|
|
1
|
+
# Tournament
|
2
|
+
|
3
|
+
Tally the results of a small football competition.
|
4
|
+
|
5
|
+
Based on an input file containing which team played against which and what the
|
6
|
+
outcome was, create a file with a table like this:
|
7
|
+
|
8
|
+
```
|
9
|
+
Team | MP | W | D | L | P
|
10
|
+
Devastating Donkeys | 3 | 2 | 1 | 0 | 7
|
11
|
+
Allegoric Alaskans | 3 | 2 | 0 | 1 | 6
|
12
|
+
Blithering Badgers | 3 | 1 | 0 | 2 | 3
|
13
|
+
Courageous Californians | 3 | 0 | 1 | 2 | 1
|
14
|
+
```
|
15
|
+
|
16
|
+
What do those abbreviations mean?
|
17
|
+
|
18
|
+
- MP: Matches Played
|
19
|
+
- W: Matches Won
|
20
|
+
- D: Matches Drawn (Tied)
|
21
|
+
- L: Matches Lost
|
22
|
+
- P: Points
|
23
|
+
|
24
|
+
A win earns a team 3 points. A draw earns 1. A loss earns 0.
|
25
|
+
|
26
|
+
The outcome should be ordered by points, descending. In case of a tie, teams are ordered alphabetically.
|
27
|
+
|
28
|
+
###
|
29
|
+
|
30
|
+
Input
|
31
|
+
|
32
|
+
Your tallying program will receive input that looks like:
|
33
|
+
|
34
|
+
```
|
35
|
+
Allegoric Alaskans;Blithering Badgers;win
|
36
|
+
Devastating Donkeys;Courageous Californians;draw
|
37
|
+
Devastating Donkeys;Allegoric Alaskans;win
|
38
|
+
Courageous Californians;Blithering Badgers;loss
|
39
|
+
Blithering Badgers;Devastating Donkeys;loss
|
40
|
+
Allegoric Alaskans;Courageous Californians;win
|
41
|
+
```
|
42
|
+
|
43
|
+
The result of the match refers to the first team listed. So this line
|
44
|
+
|
45
|
+
```
|
46
|
+
Allegoric Alaskans;Blithering Badgers;win
|
47
|
+
```
|
48
|
+
|
49
|
+
Means that the Allegoric Alaskans beat the Blithering Badgers.
|
50
|
+
|
51
|
+
This line:
|
52
|
+
|
53
|
+
```
|
54
|
+
Courageous Californians;Blithering Badgers;loss
|
55
|
+
```
|
56
|
+
|
57
|
+
Means that the Blithering Badgers beat the Courageous Californians.
|
58
|
+
|
59
|
+
And this line:
|
60
|
+
|
61
|
+
```
|
62
|
+
Devastating Donkeys;Courageous Californians;draw
|
63
|
+
```
|
64
|
+
|
65
|
+
Means that the Devastating Donkeys and Courageous Californians tied.
|
66
|
+
|
67
|
+
* * * *
|
68
|
+
|
69
|
+
For installation and learning resources, refer to the
|
70
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
71
|
+
|
72
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
73
|
+
terminal window and run the following command to install minitest:
|
74
|
+
|
75
|
+
gem install minitest
|
76
|
+
|
77
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
78
|
+
the test file, or note the alternative instruction, below, for running
|
79
|
+
the test file.
|
80
|
+
|
81
|
+
In order to run the test, you can run the test file from the exercise
|
82
|
+
directory. For example, if the test suite is called
|
83
|
+
`hello_world_test.rb`, you can run the following command:
|
84
|
+
|
85
|
+
ruby hello_world_test.rb
|
86
|
+
|
87
|
+
To include color from the command line:
|
88
|
+
|
89
|
+
ruby -r minitest/pride hello_world_test.rb
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
## Submitting Incomplete Solutions
|
94
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# Transpose
|
2
|
+
|
3
|
+
Given an input text output it transposed.
|
4
|
+
|
5
|
+
Roughly explained, the transpose of a matrix:
|
6
|
+
|
7
|
+
```
|
8
|
+
ABC
|
9
|
+
DEF
|
10
|
+
```
|
11
|
+
|
12
|
+
is given by:
|
13
|
+
|
14
|
+
```
|
15
|
+
AD
|
16
|
+
BE
|
17
|
+
CF
|
18
|
+
```
|
19
|
+
|
20
|
+
Rows become columns and columns become rows. See <https://en.wikipedia.org/wiki/Transpose>.
|
21
|
+
|
22
|
+
If the input has rows of different lengths, this is to be solved as follows:
|
23
|
+
|
24
|
+
- Pad to the left with spaces.
|
25
|
+
- Don't pad to the right.
|
26
|
+
|
27
|
+
Therefore, transposing this matrix:
|
28
|
+
|
29
|
+
```
|
30
|
+
ABC
|
31
|
+
DE
|
32
|
+
```
|
33
|
+
|
34
|
+
results in:
|
35
|
+
|
36
|
+
```
|
37
|
+
AD
|
38
|
+
BE
|
39
|
+
C
|
40
|
+
```
|
41
|
+
|
42
|
+
And transposing:
|
43
|
+
|
44
|
+
```
|
45
|
+
AB
|
46
|
+
DEF
|
47
|
+
```
|
48
|
+
|
49
|
+
results in:
|
50
|
+
|
51
|
+
```
|
52
|
+
AD
|
53
|
+
BE
|
54
|
+
F
|
55
|
+
```
|
56
|
+
|
57
|
+
In general, all characters from the input should also be present in the transposed output.
|
58
|
+
That means that if a column in the input text contains only spaces on its bottom-most row(s),
|
59
|
+
the corresponding output row should contain the spaces in its right-most column(s).
|
60
|
+
|
61
|
+
* * * *
|
62
|
+
|
63
|
+
For installation and learning resources, refer to the
|
64
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
65
|
+
|
66
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
67
|
+
terminal window and run the following command to install minitest:
|
68
|
+
|
69
|
+
gem install minitest
|
70
|
+
|
71
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
72
|
+
the test file, or note the alternative instruction, below, for running
|
73
|
+
the test file.
|
74
|
+
|
75
|
+
In order to run the test, you can run the test file from the exercise
|
76
|
+
directory. For example, if the test suite is called
|
77
|
+
`hello_world_test.rb`, you can run the following command:
|
78
|
+
|
79
|
+
ruby hello_world_test.rb
|
80
|
+
|
81
|
+
To include color from the command line:
|
82
|
+
|
83
|
+
ruby -r minitest/pride hello_world_test.rb
|
84
|
+
|
85
|
+
|
86
|
+
## Source
|
87
|
+
|
88
|
+
Reddit r/dailyprogrammer challenge #270 [Easy]. [https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text](https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text)
|
89
|
+
|
90
|
+
## Submitting Incomplete Solutions
|
91
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Triangle
|
2
|
+
|
3
|
+
Determine if a triangle is equilateral, isosceles, or scalene.
|
4
|
+
|
5
|
+
An _equilateral_ triangle has all three sides the same length.<br/>
|
6
|
+
An _isosceles_ triangle has at least two sides the same length. (It is sometimes
|
7
|
+
specified as having exactly two sides the same length, but for the purposes of
|
8
|
+
this exercise we'll say at least two.)<br/>
|
9
|
+
A _scalene_ triangle has all sides of different lengths.
|
10
|
+
|
11
|
+
## Note
|
12
|
+
|
13
|
+
For a shape to be a triangle at all, all sides have to be of length > 0, and
|
14
|
+
the sum of the lengths of any two sides must be greater than or equal to the
|
15
|
+
length of the third side. See [Triangle Inequality](https://en.wikipedia.org/wiki/Triangle_inequality).
|
16
|
+
|
17
|
+
## Dig Deeper
|
18
|
+
|
19
|
+
The case where the sum of the lengths of two sides _equals_ that of the
|
20
|
+
third is known as a _degenerate_ triangle - it has zero area and looks like
|
21
|
+
a single line. Feel free to add your own code/tests to check for degenerate triangles.
|
22
|
+
* * * *
|
23
|
+
|
24
|
+
For installation and learning resources, refer to the
|
25
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
26
|
+
|
27
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
28
|
+
terminal window and run the following command to install minitest:
|
29
|
+
|
30
|
+
gem install minitest
|
31
|
+
|
32
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
33
|
+
the test file, or note the alternative instruction, below, for running
|
34
|
+
the test file.
|
35
|
+
|
36
|
+
In order to run the test, you can run the test file from the exercise
|
37
|
+
directory. For example, if the test suite is called
|
38
|
+
`hello_world_test.rb`, you can run the following command:
|
39
|
+
|
40
|
+
ruby hello_world_test.rb
|
41
|
+
|
42
|
+
To include color from the command line:
|
43
|
+
|
44
|
+
ruby -r minitest/pride hello_world_test.rb
|
45
|
+
|
46
|
+
|
47
|
+
## Source
|
48
|
+
|
49
|
+
The Ruby Koans triangle project, parts 1 & 2 [http://rubykoans.com](http://rubykoans.com)
|
50
|
+
|
51
|
+
## Submitting Incomplete Solutions
|
52
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Trinary
|
2
|
+
|
3
|
+
Convert a trinary number, represented as a string (e.g. '102012'), to its
|
4
|
+
decimal equivalent using first principles.
|
5
|
+
|
6
|
+
The program should consider strings specifying an invalid trinary as the
|
7
|
+
value 0.
|
8
|
+
|
9
|
+
Trinary numbers contain three symbols: 0, 1, and 2.
|
10
|
+
|
11
|
+
The last place in a trinary number is the 1's place. The second to last
|
12
|
+
is the 3's place, the third to last is the 9's place, etc.
|
13
|
+
|
14
|
+
```bash
|
15
|
+
# "102012"
|
16
|
+
1 0 2 0 1 2 # the number
|
17
|
+
1*3^5 + 0*3^4 + 2*3^3 + 0*3^2 + 1*3^1 + 2*3^0 # the value
|
18
|
+
243 + 0 + 54 + 0 + 3 + 2 = 302
|
19
|
+
```
|
20
|
+
|
21
|
+
If your language provides a method in the standard library to perform the
|
22
|
+
conversion, pretend it doesn't exist and implement it yourself.
|
23
|
+
|
24
|
+
* * * *
|
25
|
+
|
26
|
+
For installation and learning resources, refer to the
|
27
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
28
|
+
|
29
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
30
|
+
terminal window and run the following command to install minitest:
|
31
|
+
|
32
|
+
gem install minitest
|
33
|
+
|
34
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
35
|
+
the test file, or note the alternative instruction, below, for running
|
36
|
+
the test file.
|
37
|
+
|
38
|
+
In order to run the test, you can run the test file from the exercise
|
39
|
+
directory. For example, if the test suite is called
|
40
|
+
`hello_world_test.rb`, you can run the following command:
|
41
|
+
|
42
|
+
ruby hello_world_test.rb
|
43
|
+
|
44
|
+
To include color from the command line:
|
45
|
+
|
46
|
+
ruby -r minitest/pride hello_world_test.rb
|
47
|
+
|
48
|
+
|
49
|
+
## Source
|
50
|
+
|
51
|
+
All of Computer Science [http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-](http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-)
|
52
|
+
|
53
|
+
## Submitting Incomplete Solutions
|
54
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# Twelve Days
|
2
|
+
|
3
|
+
Output the lyrics to 'The Twelve Days of Christmas'.
|
4
|
+
|
5
|
+
```
|
6
|
+
On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.
|
7
|
+
|
8
|
+
On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.
|
9
|
+
|
10
|
+
On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
11
|
+
|
12
|
+
On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
13
|
+
|
14
|
+
On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
15
|
+
|
16
|
+
On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
17
|
+
|
18
|
+
On the seventh day of Christmas my true love gave to me, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
19
|
+
|
20
|
+
On the eighth day of Christmas my true love gave to me, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
21
|
+
|
22
|
+
On the ninth day of Christmas my true love gave to me, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
23
|
+
|
24
|
+
On the tenth day of Christmas my true love gave to me, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
25
|
+
|
26
|
+
On the eleventh day of Christmas my true love gave to me, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
27
|
+
|
28
|
+
On the twelfth day of Christmas my true love gave to me, twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
|
29
|
+
```
|
30
|
+
|
31
|
+
* * * *
|
32
|
+
|
33
|
+
For installation and learning resources, refer to the
|
34
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
35
|
+
|
36
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
37
|
+
terminal window and run the following command to install minitest:
|
38
|
+
|
39
|
+
gem install minitest
|
40
|
+
|
41
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
42
|
+
the test file, or note the alternative instruction, below, for running
|
43
|
+
the test file.
|
44
|
+
|
45
|
+
In order to run the test, you can run the test file from the exercise
|
46
|
+
directory. For example, if the test suite is called
|
47
|
+
`hello_world_test.rb`, you can run the following command:
|
48
|
+
|
49
|
+
ruby hello_world_test.rb
|
50
|
+
|
51
|
+
To include color from the command line:
|
52
|
+
|
53
|
+
ruby -r minitest/pride hello_world_test.rb
|
54
|
+
|
55
|
+
|
56
|
+
## Source
|
57
|
+
|
58
|
+
Wikipedia [http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song)](http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song))
|
59
|
+
|
60
|
+
## Submitting Incomplete Solutions
|
61
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Two Bucket
|
2
|
+
|
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.
|
4
|
+
|
5
|
+
Since this mathematical problem is fairly subject to interpretation / individual approach, the tests have been written specifically to expect one overarching solution.
|
6
|
+
|
7
|
+
To help, the tests provide you with which bucket to fill first. That means, when starting with the larger bucket full, you are NOT allowed at any point to have the smaller bucket full and the larger bucket empty (aka, the opposite starting point); that would defeat the purpose of comparing both approaches!
|
8
|
+
|
9
|
+
Your program will take as input:
|
10
|
+
- the size of bucket one, passed as a numeric value
|
11
|
+
- the size of bucket two, passed as a numeric value
|
12
|
+
- the desired number of liters to reach, passed as a numeric value
|
13
|
+
- which bucket to fill first, passed as a String (either 'one' or 'two')
|
14
|
+
|
15
|
+
Your program should determine:
|
16
|
+
- the total number of "moves" it should take to reach the desired number of liters, including the first fill - expects a numeric value
|
17
|
+
- which bucket should end up with the desired number of liters (let's say this is bucket A) - expects a String (either 'one' or 'two')
|
18
|
+
- how many liters are left in the other bucket (bucket B) - expects a numeric value
|
19
|
+
|
20
|
+
Note: any time a change is made to either or both buckets counts as one (1) move.
|
21
|
+
|
22
|
+
Example:
|
23
|
+
Bucket one can hold up to 7 liters, and bucket two can hold up to 11 liters. Let's say bucket one, at a given step, is holding 7 liters, and bucket two is holding 8 liters (7,8). If you empty bucket one and make no change to bucket two, leaving you with 0 liters and 8 liters respectively (0,8), that counts as one "move". Instead, if you had poured from bucket one into bucket two until bucket two was full, leaving you with 4 liters in bucket one and 11 liters in bucket two (4,11), that would count as only one "move" as well.
|
24
|
+
|
25
|
+
To conclude, the only valid moves are:
|
26
|
+
- pouring from one bucket to another
|
27
|
+
- emptying one bucket and doing nothing to the other
|
28
|
+
- filling one bucket and doing nothing to the other
|
29
|
+
|
30
|
+
Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by [Lindsay](http://lindsaylevine.com).
|
31
|
+
|
32
|
+
* * * *
|
33
|
+
|
34
|
+
For installation and learning resources, refer to the
|
35
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
36
|
+
|
37
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
38
|
+
terminal window and run the following command to install minitest:
|
39
|
+
|
40
|
+
gem install minitest
|
41
|
+
|
42
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
43
|
+
the test file, or note the alternative instruction, below, for running
|
44
|
+
the test file.
|
45
|
+
|
46
|
+
In order to run the test, you can run the test file from the exercise
|
47
|
+
directory. For example, if the test suite is called
|
48
|
+
`hello_world_test.rb`, you can run the following command:
|
49
|
+
|
50
|
+
ruby hello_world_test.rb
|
51
|
+
|
52
|
+
To include color from the command line:
|
53
|
+
|
54
|
+
ruby -r minitest/pride hello_world_test.rb
|
55
|
+
|
56
|
+
|
57
|
+
## Source
|
58
|
+
|
59
|
+
Water Pouring Problem [http://demonstrations.wolfram.com/WaterPouringProblem/](http://demonstrations.wolfram.com/WaterPouringProblem/)
|
60
|
+
|
61
|
+
## Submitting Incomplete Solutions
|
62
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Word Count
|
2
|
+
|
3
|
+
Given a phrase, count the occurrences of each word in that phrase.
|
4
|
+
|
5
|
+
For example for the input `"olly olly in come free"`
|
6
|
+
|
7
|
+
```plain
|
8
|
+
olly: 2
|
9
|
+
in: 1
|
10
|
+
come: 1
|
11
|
+
free: 1
|
12
|
+
```
|
13
|
+
|
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
|
+
This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour.
|
43
|
+
|
44
|
+
## Submitting Incomplete Solutions
|
45
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|