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,44 @@
|
|
1
|
+
# Flatten Array
|
2
|
+
|
3
|
+
Take a nested list and return a single flattened list with all values except nil/null.
|
4
|
+
|
5
|
+
The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
|
6
|
+
|
7
|
+
For Example
|
8
|
+
|
9
|
+
input: [1,[2,3,null,4],[null],5]
|
10
|
+
|
11
|
+
output: [1,2,3,4,5]
|
12
|
+
|
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
|
+
Interview Question [https://reference.wolfram.com/language/ref/Flatten.html](https://reference.wolfram.com/language/ref/Flatten.html)
|
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,96 @@
|
|
1
|
+
# Food Chain
|
2
|
+
|
3
|
+
Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.
|
4
|
+
|
5
|
+
While you could copy/paste the lyrics,
|
6
|
+
or read them from a file, this problem is much more
|
7
|
+
interesting if you approach it algorithmically.
|
8
|
+
|
9
|
+
This is a [cumulative song](http://en.wikipedia.org/wiki/Cumulative_song) of unknown origin.
|
10
|
+
|
11
|
+
This is one of many common variants.
|
12
|
+
|
13
|
+
```plain
|
14
|
+
I know an old lady who swallowed a fly.
|
15
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
16
|
+
|
17
|
+
I know an old lady who swallowed a spider.
|
18
|
+
It wriggled and jiggled and tickled inside her.
|
19
|
+
She swallowed the spider to catch the fly.
|
20
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
21
|
+
|
22
|
+
I know an old lady who swallowed a bird.
|
23
|
+
How absurd to swallow a bird!
|
24
|
+
She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.
|
25
|
+
She swallowed the spider to catch the fly.
|
26
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
27
|
+
|
28
|
+
I know an old lady who swallowed a cat.
|
29
|
+
Imagine that, to swallow a cat!
|
30
|
+
She swallowed the cat to catch the bird.
|
31
|
+
She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.
|
32
|
+
She swallowed the spider to catch the fly.
|
33
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
34
|
+
|
35
|
+
I know an old lady who swallowed a dog.
|
36
|
+
What a hog, to swallow a dog!
|
37
|
+
She swallowed the dog to catch the cat.
|
38
|
+
She swallowed the cat to catch the bird.
|
39
|
+
She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.
|
40
|
+
She swallowed the spider to catch the fly.
|
41
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
42
|
+
|
43
|
+
I know an old lady who swallowed a goat.
|
44
|
+
Just opened her throat and swallowed a goat!
|
45
|
+
She swallowed the goat to catch the dog.
|
46
|
+
She swallowed the dog to catch the cat.
|
47
|
+
She swallowed the cat to catch the bird.
|
48
|
+
She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.
|
49
|
+
She swallowed the spider to catch the fly.
|
50
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
51
|
+
|
52
|
+
I know an old lady who swallowed a cow.
|
53
|
+
I don't know how she swallowed a cow!
|
54
|
+
She swallowed the cow to catch the goat.
|
55
|
+
She swallowed the goat to catch the dog.
|
56
|
+
She swallowed the dog to catch the cat.
|
57
|
+
She swallowed the cat to catch the bird.
|
58
|
+
She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.
|
59
|
+
She swallowed the spider to catch the fly.
|
60
|
+
I don't know why she swallowed the fly. Perhaps she'll die.
|
61
|
+
|
62
|
+
I know an old lady who swallowed a horse.
|
63
|
+
She's dead, of course!
|
64
|
+
```
|
65
|
+
|
66
|
+
* * * *
|
67
|
+
|
68
|
+
For installation and learning resources, refer to the
|
69
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
70
|
+
|
71
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
72
|
+
terminal window and run the following command to install minitest:
|
73
|
+
|
74
|
+
gem install minitest
|
75
|
+
|
76
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
77
|
+
the test file, or note the alternative instruction, below, for running
|
78
|
+
the test file.
|
79
|
+
|
80
|
+
In order to run the test, you can run the test file from the exercise
|
81
|
+
directory. For example, if the test suite is called
|
82
|
+
`hello_world_test.rb`, you can run the following command:
|
83
|
+
|
84
|
+
ruby hello_world_test.rb
|
85
|
+
|
86
|
+
To include color from the command line:
|
87
|
+
|
88
|
+
ruby -r minitest/pride hello_world_test.rb
|
89
|
+
|
90
|
+
|
91
|
+
## Source
|
92
|
+
|
93
|
+
Wikipedia [http://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly](http://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly)
|
94
|
+
|
95
|
+
## Submitting Incomplete Solutions
|
96
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Gigasecond
|
2
|
+
|
3
|
+
Calculate the moment when someone has lived for 10^9 seconds.
|
4
|
+
|
5
|
+
A gigasecond is 10^9 (1,000,000,000) seconds.
|
6
|
+
|
7
|
+
* * * *
|
8
|
+
|
9
|
+
For installation and learning resources, refer to the
|
10
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
11
|
+
|
12
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
13
|
+
terminal window and run the following command to install minitest:
|
14
|
+
|
15
|
+
gem install minitest
|
16
|
+
|
17
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
18
|
+
the test file, or note the alternative instruction, below, for running
|
19
|
+
the test file.
|
20
|
+
|
21
|
+
In order to run the test, you can run the test file from the exercise
|
22
|
+
directory. For example, if the test suite is called
|
23
|
+
`hello_world_test.rb`, you can run the following command:
|
24
|
+
|
25
|
+
ruby hello_world_test.rb
|
26
|
+
|
27
|
+
To include color from the command line:
|
28
|
+
|
29
|
+
ruby -r minitest/pride hello_world_test.rb
|
30
|
+
|
31
|
+
|
32
|
+
## Source
|
33
|
+
|
34
|
+
Chapter 9 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=09](http://pine.fm/LearnToProgram/?Chapter=09)
|
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,68 @@
|
|
1
|
+
# Grade School
|
2
|
+
|
3
|
+
Given students' names along with the grade that they are in, create a roster
|
4
|
+
for the school.
|
5
|
+
|
6
|
+
In the end, you should be able to:
|
7
|
+
|
8
|
+
- Add a student's name to the roster for a grade
|
9
|
+
- "Add Jim to grade 2."
|
10
|
+
- "OK."
|
11
|
+
- Get a list of all students enrolled in a grade
|
12
|
+
- "Which students are in grade 2?"
|
13
|
+
- "We've only got Jim just now."
|
14
|
+
- Get a sorted list of all students in all grades. Grades should sort
|
15
|
+
as 1, 2, 3, etc., and students within a grade should be sorted
|
16
|
+
alphabetically by name.
|
17
|
+
- "Who all is enrolled in school right now?"
|
18
|
+
- "Grade 1: Anna, Barb, and Charlie. Grade 2: Alex, Peter, and Zoe.
|
19
|
+
Grade 3…"
|
20
|
+
|
21
|
+
Note that all our students only have one name. (It's a small town, what
|
22
|
+
do you want?)
|
23
|
+
|
24
|
+
|
25
|
+
## For bonus points
|
26
|
+
|
27
|
+
Did you get the tests passing and the code clean? If you want to, these
|
28
|
+
are some additional things you could try:
|
29
|
+
|
30
|
+
- If you're working in a language with mutable data structures and your
|
31
|
+
implementation allows outside code to mutate the school's internal DB
|
32
|
+
directly, see if you can prevent this. Feel free to introduce additional
|
33
|
+
tests.
|
34
|
+
|
35
|
+
Then please share your thoughts in a comment on the submission. Did this
|
36
|
+
experiment make the code better? Worse? Did you learn anything from it?
|
37
|
+
|
38
|
+
* * * *
|
39
|
+
|
40
|
+
For installation and learning resources, refer to the
|
41
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
42
|
+
|
43
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
44
|
+
terminal window and run the following command to install minitest:
|
45
|
+
|
46
|
+
gem install minitest
|
47
|
+
|
48
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
49
|
+
the test file, or note the alternative instruction, below, for running
|
50
|
+
the test file.
|
51
|
+
|
52
|
+
In order to run the test, you can run the test file from the exercise
|
53
|
+
directory. For example, if the test suite is called
|
54
|
+
`hello_world_test.rb`, you can run the following command:
|
55
|
+
|
56
|
+
ruby hello_world_test.rb
|
57
|
+
|
58
|
+
To include color from the command line:
|
59
|
+
|
60
|
+
ruby -r minitest/pride hello_world_test.rb
|
61
|
+
|
62
|
+
|
63
|
+
## Source
|
64
|
+
|
65
|
+
A pairing session with Phil Battos at gSchool [http://gschool.it](http://gschool.it)
|
66
|
+
|
67
|
+
## Submitting Incomplete Solutions
|
68
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Grains
|
2
|
+
|
3
|
+
Calculate the number of grains of wheat on a chessboard given that the number
|
4
|
+
on each square doubles.
|
5
|
+
|
6
|
+
There once was a wise servant who saved the life of a prince. The king
|
7
|
+
promised to pay whatever the servant could dream up. Knowing that the
|
8
|
+
king loved chess, the servant told the king he would like to have grains
|
9
|
+
of wheat. One grain on the first square of a chess board. Two grains on
|
10
|
+
the next. Four on the third, and so on.
|
11
|
+
|
12
|
+
There are 64 squares on a chessboard.
|
13
|
+
|
14
|
+
Write code that shows:
|
15
|
+
- how many grains were on each square, and
|
16
|
+
- the total number of grains
|
17
|
+
|
18
|
+
|
19
|
+
## For bonus points
|
20
|
+
|
21
|
+
Did you get the tests passing and the code clean? If you want to, these
|
22
|
+
are some additional things you could try:
|
23
|
+
|
24
|
+
- Optimize for speed.
|
25
|
+
- Optimize for readability.
|
26
|
+
|
27
|
+
Then please share your thoughts in a comment on the submission. Did this
|
28
|
+
experiment make the code better? Worse? Did you learn anything from it?
|
29
|
+
|
30
|
+
* * * *
|
31
|
+
|
32
|
+
For installation and learning resources, refer to the
|
33
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
34
|
+
|
35
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
36
|
+
terminal window and run the following command to install minitest:
|
37
|
+
|
38
|
+
gem install minitest
|
39
|
+
|
40
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
41
|
+
the test file, or note the alternative instruction, below, for running
|
42
|
+
the test file.
|
43
|
+
|
44
|
+
In order to run the test, you can run the test file from the exercise
|
45
|
+
directory. For example, if the test suite is called
|
46
|
+
`hello_world_test.rb`, you can run the following command:
|
47
|
+
|
48
|
+
ruby hello_world_test.rb
|
49
|
+
|
50
|
+
To include color from the command line:
|
51
|
+
|
52
|
+
ruby -r minitest/pride hello_world_test.rb
|
53
|
+
|
54
|
+
|
55
|
+
## Source
|
56
|
+
|
57
|
+
JavaRanch Cattle Drive, exercise 6 [http://www.javaranch.com/grains.jsp](http://www.javaranch.com/grains.jsp)
|
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,68 @@
|
|
1
|
+
# Hamming
|
2
|
+
|
3
|
+
Calculate the Hamming difference between two DNA strands.
|
4
|
+
|
5
|
+
A mutation is simply a mistake that occurs during the creation or
|
6
|
+
copying of a nucleic acid, in particular DNA. Because nucleic acids are
|
7
|
+
vital to cellular functions, mutations tend to cause a ripple effect
|
8
|
+
throughout the cell. Although mutations are technically mistakes, a very
|
9
|
+
rare mutation may equip the cell with a beneficial attribute. In fact,
|
10
|
+
the macro effects of evolution are attributable by the accumulated
|
11
|
+
result of beneficial microscopic mutations over many generations.
|
12
|
+
|
13
|
+
The simplest and most common type of nucleic acid mutation is a point
|
14
|
+
mutation, which replaces one base with another at a single nucleotide.
|
15
|
+
|
16
|
+
By counting the number of differences between two homologous DNA strands
|
17
|
+
taken from different genomes with a common ancestor, we get a measure of
|
18
|
+
the minimum number of point mutations that could have occurred on the
|
19
|
+
evolutionary path between the two strands.
|
20
|
+
|
21
|
+
This is called the 'Hamming distance'.
|
22
|
+
|
23
|
+
It is found by comparing two DNA strands and counting how many of the
|
24
|
+
nucleotides are different from their equivalent in the other string.
|
25
|
+
|
26
|
+
GAGCCTACTAACGGGAT
|
27
|
+
CATCGTAATGACGGCCT
|
28
|
+
^ ^ ^ ^ ^ ^^
|
29
|
+
|
30
|
+
The Hamming distance between these two DNA strands is 7.
|
31
|
+
|
32
|
+
# Implementation notes
|
33
|
+
|
34
|
+
The Hamming distance is only defined for sequences of equal length. This means
|
35
|
+
that based on the definition, each language could deal with getting sequences
|
36
|
+
of equal length differently.
|
37
|
+
|
38
|
+
* * * *
|
39
|
+
|
40
|
+
For installation and learning resources, refer to the
|
41
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
42
|
+
|
43
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
44
|
+
terminal window and run the following command to install minitest:
|
45
|
+
|
46
|
+
gem install minitest
|
47
|
+
|
48
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
49
|
+
the test file, or note the alternative instruction, below, for running
|
50
|
+
the test file.
|
51
|
+
|
52
|
+
In order to run the test, you can run the test file from the exercise
|
53
|
+
directory. For example, if the test suite is called
|
54
|
+
`hello_world_test.rb`, you can run the following command:
|
55
|
+
|
56
|
+
ruby hello_world_test.rb
|
57
|
+
|
58
|
+
To include color from the command line:
|
59
|
+
|
60
|
+
ruby -r minitest/pride hello_world_test.rb
|
61
|
+
|
62
|
+
|
63
|
+
## Source
|
64
|
+
|
65
|
+
The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/)
|
66
|
+
|
67
|
+
## Submitting Incomplete Solutions
|
68
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Hello World
|
2
|
+
|
3
|
+
The classical introductory exercise. Just say "Hello, World!".
|
4
|
+
|
5
|
+
["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
|
6
|
+
the traditional first program for beginning programming in a new language
|
7
|
+
or environment.
|
8
|
+
|
9
|
+
The objectives are simple:
|
10
|
+
|
11
|
+
- Write a function that returns the string "Hello, World!".
|
12
|
+
- Run the test suite and make sure that it succeeds.
|
13
|
+
- Submit your solution and check it at the website.
|
14
|
+
|
15
|
+
If everything goes well, you will be ready to fetch your first real exercise.
|
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
|
+
## Source
|
43
|
+
|
44
|
+
This is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program)
|
45
|
+
|
46
|
+
## Submitting Incomplete Solutions
|
47
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Hexadecimal
|
2
|
+
|
3
|
+
Convert a hexadecimal number, represented as a string (e.g. "10af8c"), to its decimal equivalent using first principles (i.e. no, you may not use built-in or external libraries to accomplish the conversion).
|
4
|
+
|
5
|
+
On the web we use hexadecimal to represent colors, e.g. green: 008000,
|
6
|
+
teal: 008080, navy: 000080).
|
7
|
+
|
8
|
+
The program should handle invalid hexadecimal strings.
|
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
|
+
## Source
|
36
|
+
|
37
|
+
All of Computer Science [http://www.wolframalpha.com/examples/NumberBases.html](http://www.wolframalpha.com/examples/NumberBases.html)
|
38
|
+
|
39
|
+
## Submitting Incomplete Solutions
|
40
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# House
|
2
|
+
|
3
|
+
Output the nursery rhyme 'This is the House that Jack Built'.
|
4
|
+
|
5
|
+
> [The] process of placing a phrase of clause within another phrase of
|
6
|
+
> clause is called embedding. It is through the processes of recursion
|
7
|
+
> and embedding that we are able to take a finite number of forms (words
|
8
|
+
> and phrases) and construct an infinite number of expressions.
|
9
|
+
> Furthermore, embedding also allows us to construct an infinitely long
|
10
|
+
> structure, in theory anyway.
|
11
|
+
|
12
|
+
- [papyr.com](http://papyr.com/hypertextbooks/grammar/ph_noun.htm)
|
13
|
+
|
14
|
+
|
15
|
+
The nursery rhyme reads as follows:
|
16
|
+
|
17
|
+
```plain
|
18
|
+
This is the house that Jack built.
|
19
|
+
|
20
|
+
This is the malt
|
21
|
+
that lay in the house that Jack built.
|
22
|
+
|
23
|
+
This is the rat
|
24
|
+
that ate the malt
|
25
|
+
that lay in the house that Jack built.
|
26
|
+
|
27
|
+
This is the cat
|
28
|
+
that killed the rat
|
29
|
+
that ate the malt
|
30
|
+
that lay in the house that Jack built.
|
31
|
+
|
32
|
+
This is the dog
|
33
|
+
that worried the cat
|
34
|
+
that killed the rat
|
35
|
+
that ate the malt
|
36
|
+
that lay in the house that Jack built.
|
37
|
+
|
38
|
+
This is the cow with the crumpled horn
|
39
|
+
that tossed the dog
|
40
|
+
that worried the cat
|
41
|
+
that killed the rat
|
42
|
+
that ate the malt
|
43
|
+
that lay in the house that Jack built.
|
44
|
+
|
45
|
+
This is the maiden all forlorn
|
46
|
+
that milked the cow with the crumpled horn
|
47
|
+
that tossed the dog
|
48
|
+
that worried the cat
|
49
|
+
that killed the rat
|
50
|
+
that ate the malt
|
51
|
+
that lay in the house that Jack built.
|
52
|
+
|
53
|
+
This is the man all tattered and torn
|
54
|
+
that kissed the maiden all forlorn
|
55
|
+
that milked the cow with the crumpled horn
|
56
|
+
that tossed the dog
|
57
|
+
that worried the cat
|
58
|
+
that killed the rat
|
59
|
+
that ate the malt
|
60
|
+
that lay in the house that Jack built.
|
61
|
+
|
62
|
+
This is the priest all shaven and shorn
|
63
|
+
that married the man all tattered and torn
|
64
|
+
that kissed the maiden all forlorn
|
65
|
+
that milked the cow with the crumpled horn
|
66
|
+
that tossed the dog
|
67
|
+
that worried the cat
|
68
|
+
that killed the rat
|
69
|
+
that ate the malt
|
70
|
+
that lay in the house that Jack built.
|
71
|
+
|
72
|
+
This is the rooster that crowed in the morn
|
73
|
+
that woke the priest all shaven and shorn
|
74
|
+
that married the man all tattered and torn
|
75
|
+
that kissed the maiden all forlorn
|
76
|
+
that milked the cow with the crumpled horn
|
77
|
+
that tossed the dog
|
78
|
+
that worried the cat
|
79
|
+
that killed the rat
|
80
|
+
that ate the malt
|
81
|
+
that lay in the house that Jack built.
|
82
|
+
|
83
|
+
This is the farmer sowing his corn
|
84
|
+
that kept the rooster that crowed in the morn
|
85
|
+
that woke the priest all shaven and shorn
|
86
|
+
that married the man all tattered and torn
|
87
|
+
that kissed the maiden all forlorn
|
88
|
+
that milked the cow with the crumpled horn
|
89
|
+
that tossed the dog
|
90
|
+
that worried the cat
|
91
|
+
that killed the rat
|
92
|
+
that ate the malt
|
93
|
+
that lay in the house that Jack built.
|
94
|
+
|
95
|
+
This is the horse and the hound and the horn
|
96
|
+
that belonged to the farmer sowing his corn
|
97
|
+
that kept the rooster that crowed in the morn
|
98
|
+
that woke the priest all shaven and shorn
|
99
|
+
that married the man all tattered and torn
|
100
|
+
that kissed the maiden all forlorn
|
101
|
+
that milked the cow with the crumpled horn
|
102
|
+
that tossed the dog
|
103
|
+
that worried the cat
|
104
|
+
that killed the rat
|
105
|
+
that ate the malt
|
106
|
+
that lay in the house that Jack built.
|
107
|
+
```
|
108
|
+
|
109
|
+
* * * *
|
110
|
+
|
111
|
+
For installation and learning resources, refer to the
|
112
|
+
[exercism help page](http://exercism.io/languages/ruby).
|
113
|
+
|
114
|
+
For running the tests provided, you will need the Minitest gem. Open a
|
115
|
+
terminal window and run the following command to install minitest:
|
116
|
+
|
117
|
+
gem install minitest
|
118
|
+
|
119
|
+
If you would like color output, you can `require 'minitest/pride'` in
|
120
|
+
the test file, or note the alternative instruction, below, for running
|
121
|
+
the test file.
|
122
|
+
|
123
|
+
In order to run the test, you can run the test file from the exercise
|
124
|
+
directory. For example, if the test suite is called
|
125
|
+
`hello_world_test.rb`, you can run the following command:
|
126
|
+
|
127
|
+
ruby hello_world_test.rb
|
128
|
+
|
129
|
+
To include color from the command line:
|
130
|
+
|
131
|
+
ruby -r minitest/pride hello_world_test.rb
|
132
|
+
|
133
|
+
|
134
|
+
## Source
|
135
|
+
|
136
|
+
British nursery rhyme [http://en.wikipedia.org/wiki/This_Is_The_House_That_Jack_Built](http://en.wikipedia.org/wiki/This_Is_The_House_That_Jack_Built)
|
137
|
+
|
138
|
+
## Submitting Incomplete Solutions
|
139
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Isogram
|
2
|
+
|
3
|
+
Determine if a word or phrase is an isogram.
|
4
|
+
|
5
|
+
An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter.
|
6
|
+
|
7
|
+
Examples of isograms:
|
8
|
+
|
9
|
+
- lumberjacks
|
10
|
+
- background
|
11
|
+
- downstream
|
12
|
+
|
13
|
+
The word *isograms*, however, is not an isogram, because the s repeats.
|
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
|
+
Wikipedia [https://en.wikipedia.org/wiki/Isogram](https://en.wikipedia.org/wiki/Isogram)
|
43
|
+
|
44
|
+
## Submitting Incomplete Solutions
|
45
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|