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,82 @@
|
|
1
|
+
# Grep
|
2
|
+
|
3
|
+
Search a file for lines matching a regular expression pattern. Return the line
|
4
|
+
number and contents of each matching line.
|
5
|
+
|
6
|
+
The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files
|
7
|
+
that match a user-provided search query (known as the *pattern*).
|
8
|
+
|
9
|
+
The `grep` command takes three arguments:
|
10
|
+
|
11
|
+
1. The pattern used to match lines in a file.
|
12
|
+
2. Zero or more flags to customize the matching behavior.
|
13
|
+
3. One or more files in which to search for matching lines.
|
14
|
+
|
15
|
+
Your task is to implement the `grep` function, which should read the contents
|
16
|
+
of the specified files, find the lines that match the specified pattern
|
17
|
+
and then output those lines as a single string. Note that the lines should
|
18
|
+
be output in the order in which they were found, with the first matching line
|
19
|
+
in the first file being output first.
|
20
|
+
|
21
|
+
As an example, suppose there is a file named "input.txt" with the following contents:
|
22
|
+
|
23
|
+
<pre>
|
24
|
+
hello
|
25
|
+
world
|
26
|
+
hello again
|
27
|
+
</pre>
|
28
|
+
|
29
|
+
If we were to call `grep "hello" input.txt`, the returned string should be:
|
30
|
+
|
31
|
+
<pre>
|
32
|
+
hello
|
33
|
+
hello again
|
34
|
+
</pre>
|
35
|
+
|
36
|
+
### Flags
|
37
|
+
|
38
|
+
As said earlier, the `grep` command should also support the following flags:
|
39
|
+
|
40
|
+
- `-n` Print the line numbers of each matching line.
|
41
|
+
- `-l` Print only the names of files that contain at least one matching line.
|
42
|
+
- `-i` Match line using a case-insensitive comparison.
|
43
|
+
- `-v` Invert the program -- collect all lines that fail to match the pattern.
|
44
|
+
- `-x` Only match entire lines, instead of lines that contain a match.
|
45
|
+
|
46
|
+
If we run `grep -n "hello" input.txt`, the `-n` flag will require the matching
|
47
|
+
lines to be prefixed with its line number:
|
48
|
+
|
49
|
+
<pre>
|
50
|
+
1:hello
|
51
|
+
3:hello again
|
52
|
+
</pre>
|
53
|
+
|
54
|
+
And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match,
|
55
|
+
and the output will be:
|
56
|
+
|
57
|
+
<pre>
|
58
|
+
hello
|
59
|
+
hello again
|
60
|
+
</pre>
|
61
|
+
|
62
|
+
The `grep` command should support multiple flags at once.
|
63
|
+
|
64
|
+
For example, running `grep -l -v "hello" file1.txt file2.txt` should
|
65
|
+
print the names of files that do not contain the string "hello".
|
66
|
+
|
67
|
+
### Submitting Exercises
|
68
|
+
|
69
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
70
|
+
|
71
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
72
|
+
|
73
|
+
|
74
|
+
For more detailed information about running tests, code style and linting,
|
75
|
+
please see the [help page](http://exercism.io/languages/python).
|
76
|
+
|
77
|
+
## Source
|
78
|
+
|
79
|
+
Conversation with Nate Foster. [http://www.cs.cornell.edu/Courses/cs3110/2014sp/hw/0/ps0.pdf](http://www.cs.cornell.edu/Courses/cs3110/2014sp/hw/0/ps0.pdf)
|
80
|
+
|
81
|
+
## Submitting Incomplete Solutions
|
82
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,53 @@
|
|
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
|
+
### Submitting Exercises
|
39
|
+
|
40
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
41
|
+
|
42
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
43
|
+
|
44
|
+
|
45
|
+
For more detailed information about running tests, code style and linting,
|
46
|
+
please see the [help page](http://exercism.io/languages/python).
|
47
|
+
|
48
|
+
## Source
|
49
|
+
|
50
|
+
The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/)
|
51
|
+
|
52
|
+
## Submitting Incomplete Solutions
|
53
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,32 @@
|
|
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
|
+
### Submitting Exercises
|
18
|
+
|
19
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
20
|
+
|
21
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
22
|
+
|
23
|
+
|
24
|
+
For more detailed information about running tests, code style and linting,
|
25
|
+
please see the [help page](http://exercism.io/languages/python).
|
26
|
+
|
27
|
+
## Source
|
28
|
+
|
29
|
+
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)
|
30
|
+
|
31
|
+
## Submitting Incomplete Solutions
|
32
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,25 @@
|
|
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
|
+
### Submitting Exercises
|
11
|
+
|
12
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
13
|
+
|
14
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
15
|
+
|
16
|
+
|
17
|
+
For more detailed information about running tests, code style and linting,
|
18
|
+
please see the [help page](http://exercism.io/languages/python).
|
19
|
+
|
20
|
+
## Source
|
21
|
+
|
22
|
+
All of Computer Science [http://www.wolframalpha.com/examples/NumberBases.html](http://www.wolframalpha.com/examples/NumberBases.html)
|
23
|
+
|
24
|
+
## Submitting Incomplete Solutions
|
25
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,124 @@
|
|
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
|
+
### Submitting Exercises
|
110
|
+
|
111
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
112
|
+
|
113
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
114
|
+
|
115
|
+
|
116
|
+
For more detailed information about running tests, code style and linting,
|
117
|
+
please see the [help page](http://exercism.io/languages/python).
|
118
|
+
|
119
|
+
## Source
|
120
|
+
|
121
|
+
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)
|
122
|
+
|
123
|
+
## Submitting Incomplete Solutions
|
124
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,30 @@
|
|
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
|
+
### Submitting Exercises
|
16
|
+
|
17
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
18
|
+
|
19
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
20
|
+
|
21
|
+
|
22
|
+
For more detailed information about running tests, code style and linting,
|
23
|
+
please see the [help page](http://exercism.io/languages/python).
|
24
|
+
|
25
|
+
## Source
|
26
|
+
|
27
|
+
Wikipedia [https://en.wikipedia.org/wiki/Isogram](https://en.wikipedia.org/wiki/Isogram)
|
28
|
+
|
29
|
+
## Submitting Incomplete Solutions
|
30
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# Kindergarten Garden
|
2
|
+
|
3
|
+
Given a diagram, determine which plants each child in the kindergarten class is
|
4
|
+
responsible for.
|
5
|
+
|
6
|
+
The kindergarten class is learning about growing plants. The teachers
|
7
|
+
thought it would be a good idea to give them actual seeds, plant them in
|
8
|
+
actual dirt, and grow actual plants.
|
9
|
+
|
10
|
+
They've chosen to grow grass, clover, radishes, and violets.
|
11
|
+
|
12
|
+
To this end, they've put little styrofoam cups along the window sills,
|
13
|
+
and planted one type of plant in each cup, choosing randomly from the
|
14
|
+
available types of seeds.
|
15
|
+
|
16
|
+
```plain
|
17
|
+
[window][window][window]
|
18
|
+
........................ # each dot represents a styrofoam cup
|
19
|
+
........................
|
20
|
+
```
|
21
|
+
|
22
|
+
There are 12 children in the class:
|
23
|
+
|
24
|
+
- Alice, Bob, Charlie, David,
|
25
|
+
- Eve, Fred, Ginny, Harriet,
|
26
|
+
- Ileana, Joseph, Kincaid, and Larry.
|
27
|
+
|
28
|
+
Each child gets 4 cups, two on each row. The children are assigned to
|
29
|
+
cups in alphabetical order.
|
30
|
+
|
31
|
+
The following diagram represents Alice's plants:
|
32
|
+
|
33
|
+
```plain
|
34
|
+
[window][window][window]
|
35
|
+
VR......................
|
36
|
+
RG......................
|
37
|
+
```
|
38
|
+
|
39
|
+
So in the row nearest the window, she has a violet and a radish; in the
|
40
|
+
row behind that, she has a radish and some grass.
|
41
|
+
|
42
|
+
Your program will be given the plants from left-to-right starting with
|
43
|
+
the row nearest the windows. From this, it should be able to determine
|
44
|
+
which plants belong to which students.
|
45
|
+
|
46
|
+
For example, if it's told that the garden looks like so:
|
47
|
+
|
48
|
+
```plain
|
49
|
+
[window][window][window]
|
50
|
+
VRCGVVRVCGGCCGVRGCVCGCGV
|
51
|
+
VRCCCGCRRGVCGCRVVCVGCGCV
|
52
|
+
```
|
53
|
+
|
54
|
+
Then if asked for Alice's plants, it should provide:
|
55
|
+
|
56
|
+
- Violets, radishes, violets, radishes
|
57
|
+
|
58
|
+
While asking for Bob's plants would yield:
|
59
|
+
|
60
|
+
- Clover, grass, clover, clover
|
61
|
+
|
62
|
+
### Submitting Exercises
|
63
|
+
|
64
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
65
|
+
|
66
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
67
|
+
|
68
|
+
|
69
|
+
For more detailed information about running tests, code style and linting,
|
70
|
+
please see the [help page](http://exercism.io/languages/python).
|
71
|
+
|
72
|
+
## Source
|
73
|
+
|
74
|
+
Random musings during airplane trip. [http://jumpstartlab.com](http://jumpstartlab.com)
|
75
|
+
|
76
|
+
## Submitting Incomplete Solutions
|
77
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Largest Series Product
|
2
|
+
|
3
|
+
Given a string of digits, calculate the largest product for a contiguous
|
4
|
+
substring of digits of length n.
|
5
|
+
|
6
|
+
For example, for the input `'1027839564'`, the largest product for a
|
7
|
+
series of 3 digits is 270 (9 * 5 * 6), and the largest product for a
|
8
|
+
series of 5 digits is 7560 (7 * 8 * 3 * 9 * 5).
|
9
|
+
|
10
|
+
Note that these series are only required to occupy *adjacent positions*
|
11
|
+
in the input; the digits need not be *numerically consecutive*.
|
12
|
+
|
13
|
+
For the input `'73167176531330624919225119674426574742355349194934'`,
|
14
|
+
the largest product for a series of 6 digits is 23520.
|
15
|
+
|
16
|
+
### Submitting Exercises
|
17
|
+
|
18
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
19
|
+
|
20
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
21
|
+
|
22
|
+
|
23
|
+
For more detailed information about running tests, code style and linting,
|
24
|
+
please see the [help page](http://exercism.io/languages/python).
|
25
|
+
|
26
|
+
## Source
|
27
|
+
|
28
|
+
A variation on Problem 8 at Project Euler [http://projecteuler.net/problem=8](http://projecteuler.net/problem=8)
|
29
|
+
|
30
|
+
## Submitting Incomplete Solutions
|
31
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Leap
|
2
|
+
|
3
|
+
Given a year, report if it is a leap year.
|
4
|
+
|
5
|
+
The tricky thing here is that a leap year in the Gregorian calendar occurs:
|
6
|
+
|
7
|
+
```plain
|
8
|
+
on every year that is evenly divisible by 4
|
9
|
+
except every year that is evenly divisible by 100
|
10
|
+
unless the year is also evenly divisible by 400
|
11
|
+
```
|
12
|
+
|
13
|
+
For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap
|
14
|
+
year, but 2000 is.
|
15
|
+
|
16
|
+
If your language provides a method in the standard library that does
|
17
|
+
this look-up, pretend it doesn't exist and implement it yourself.
|
18
|
+
|
19
|
+
## Notes
|
20
|
+
|
21
|
+
Though our exercise adopts some very simple rules, there is more to
|
22
|
+
learn!
|
23
|
+
|
24
|
+
For a delightful, four minute explanation of the whole leap year
|
25
|
+
phenomenon, go watch [this youtube video][video].
|
26
|
+
|
27
|
+
[video]: http://www.youtube.com/watch?v=xX96xng7sAE
|
28
|
+
|
29
|
+
### Submitting Exercises
|
30
|
+
|
31
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
32
|
+
|
33
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
34
|
+
|
35
|
+
|
36
|
+
For more detailed information about running tests, code style and linting,
|
37
|
+
please see the [help page](http://exercism.io/languages/python).
|
38
|
+
|
39
|
+
## Source
|
40
|
+
|
41
|
+
JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp)
|
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,45 @@
|
|
1
|
+
# Linked List
|
2
|
+
|
3
|
+
Implement a doubly linked list.
|
4
|
+
|
5
|
+
Like an array, a linked list is a simple linear data structure. Several
|
6
|
+
common data types can be implemented using linked lists, like queues,
|
7
|
+
stacks, and associative arrays.
|
8
|
+
|
9
|
+
A linked list is a collection of data elements called *nodes*. In a
|
10
|
+
*singly linked list* each node holds a value and a link to the next node.
|
11
|
+
In a *doubly linked list* each node also holds a link to the previous
|
12
|
+
node.
|
13
|
+
|
14
|
+
You will write an implementation of a doubly linked list. Implement a
|
15
|
+
Node to hold a value and pointers to the next and previous nodes. Then
|
16
|
+
implement a List which holds references to the first and last node and
|
17
|
+
offers an array-like interface for adding and removing items:
|
18
|
+
|
19
|
+
* `push` (*insert value at back*);
|
20
|
+
* `pop` (*remove value at back*);
|
21
|
+
* `shift` (*remove value at front*).
|
22
|
+
* `unshift` (*insert value at front*);
|
23
|
+
|
24
|
+
To keep your implementation simple, the tests will not cover error
|
25
|
+
conditions. Specifically: `pop` or `shift` will never be called on an
|
26
|
+
empty list.
|
27
|
+
|
28
|
+
If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list).
|
29
|
+
|
30
|
+
### Submitting Exercises
|
31
|
+
|
32
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
33
|
+
|
34
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
35
|
+
|
36
|
+
|
37
|
+
For more detailed information about running tests, code style and linting,
|
38
|
+
please see the [help page](http://exercism.io/languages/python).
|
39
|
+
|
40
|
+
## Source
|
41
|
+
|
42
|
+
Classic computer science topic
|
43
|
+
|
44
|
+
## Submitting Incomplete Solutions
|
45
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# List Ops
|
2
|
+
|
3
|
+
Implement basic list operations.
|
4
|
+
|
5
|
+
In functional languages list operations like `length`, `map`, and
|
6
|
+
`reduce` are very common. Implement a series of basic list operations,
|
7
|
+
without using existing functions.
|
8
|
+
|
9
|
+
### Submitting Exercises
|
10
|
+
|
11
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
12
|
+
|
13
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
14
|
+
|
15
|
+
|
16
|
+
For more detailed information about running tests, code style and linting,
|
17
|
+
please see the [help page](http://exercism.io/languages/python).
|
18
|
+
|
19
|
+
|
20
|
+
## Submitting Incomplete Solutions
|
21
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Luhn
|
2
|
+
|
3
|
+
Given a number determine whether or not it is valid per the Luhn formula.
|
4
|
+
|
5
|
+
The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is
|
6
|
+
a simple checksum formula used to validate a variety of identification
|
7
|
+
numbers, such as credit card numbers and Canadian Social Insurance
|
8
|
+
Numbers.
|
9
|
+
|
10
|
+
The task is to check if a given string is valid.
|
11
|
+
|
12
|
+
Validating a Number
|
13
|
+
------
|
14
|
+
|
15
|
+
Strings of length 1 or less are not valid. Spaces are allowed in the input,
|
16
|
+
but they should be stripped before checking. All other non-digit characters
|
17
|
+
are disallowed.
|
18
|
+
|
19
|
+
## Example 1: valid credit card number
|
20
|
+
|
21
|
+
```
|
22
|
+
4539 1488 0343 6467
|
23
|
+
```
|
24
|
+
|
25
|
+
The first step of the Luhn algorithm is to double every second digit,
|
26
|
+
starting from the right. We will be doubling
|
27
|
+
|
28
|
+
```
|
29
|
+
4_3_ 1_8_ 0_4_ 6_6_
|
30
|
+
```
|
31
|
+
|
32
|
+
If doubling the number results in a number greater than 9 then subtract 9
|
33
|
+
from the product. The results of our doubling:
|
34
|
+
|
35
|
+
```
|
36
|
+
8569 2478 0383 3437
|
37
|
+
```
|
38
|
+
|
39
|
+
Then sum all of the digits:
|
40
|
+
|
41
|
+
```
|
42
|
+
8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80
|
43
|
+
```
|
44
|
+
|
45
|
+
If the sum is evenly divisible by 10, then the number is valid. This number is valid!
|
46
|
+
|
47
|
+
## Example 2: invalid credit card number
|
48
|
+
|
49
|
+
```
|
50
|
+
8273 1232 7352 0569
|
51
|
+
```
|
52
|
+
|
53
|
+
Double the second digits, starting from the right
|
54
|
+
|
55
|
+
```
|
56
|
+
7253 2262 5312 0539
|
57
|
+
```
|
58
|
+
|
59
|
+
Sum the digits
|
60
|
+
|
61
|
+
```
|
62
|
+
7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
|
63
|
+
```
|
64
|
+
|
65
|
+
57 is not evenly divisible by 10, so this number is not valid.
|
66
|
+
|
67
|
+
### Submitting Exercises
|
68
|
+
|
69
|
+
Note that, when trying to submit an exercise, make sure the solution is in the `exercism/python/<exerciseName>` directory.
|
70
|
+
|
71
|
+
For example, if you're submitting `bob.py` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/python/bob/bob.py`.
|
72
|
+
|
73
|
+
|
74
|
+
For more detailed information about running tests, code style and linting,
|
75
|
+
please see the [help page](http://exercism.io/languages/python).
|
76
|
+
|
77
|
+
## Source
|
78
|
+
|
79
|
+
The Luhn Algorithm on Wikipedia [http://en.wikipedia.org/wiki/Luhn_algorithm](http://en.wikipedia.org/wiki/Luhn_algorithm)
|
80
|
+
|
81
|
+
## Submitting Incomplete Solutions
|
82
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|