trackler 2.2.0.2 → 2.2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/fixtures/deprecation-fixtures/tracks/repo-nope/config.json +2 -0
- data/fixtures/deprecation-fixtures/tracks/repo-yepp/config.json +3 -0
- data/lib/trackler/track.rb +1 -1
- data/lib/trackler/version.rb +1 -1
- data/tracks/csharp/config/exercise_readme.go.tmpl +16 -0
- data/tracks/csharp/exercises/accumulate/README.md +44 -0
- data/tracks/csharp/exercises/acronym/README.md +21 -0
- data/tracks/csharp/exercises/all-your-base/README.md +41 -0
- data/tracks/csharp/exercises/allergies/README.md +46 -0
- data/tracks/csharp/exercises/alphametics/README.md +48 -0
- data/tracks/csharp/exercises/anagram/README.md +19 -0
- data/tracks/csharp/exercises/atbash-cipher/README.md +40 -0
- data/tracks/csharp/exercises/bank-account/README.md +41 -0
- data/tracks/csharp/exercises/beer-song/README.md +336 -0
- data/tracks/csharp/exercises/binary-search-tree/README.md +66 -0
- data/tracks/csharp/exercises/binary-search/README.md +47 -0
- data/tracks/csharp/exercises/bob/README.md +24 -0
- data/tracks/csharp/exercises/book-store/README.md +80 -0
- data/tracks/csharp/exercises/bowling/README.md +59 -0
- data/tracks/csharp/exercises/bracket-push/README.md +16 -0
- data/tracks/csharp/exercises/change/README.md +29 -0
- data/tracks/csharp/exercises/circular-buffer/README.md +56 -0
- data/tracks/csharp/exercises/clock/README.md +25 -0
- data/tracks/csharp/exercises/connect/README.md +40 -0
- data/tracks/csharp/exercises/crypto-square/README.md +80 -0
- data/tracks/csharp/exercises/custom-set/README.md +23 -0
- data/tracks/csharp/exercises/diamond/README.md +75 -0
- data/tracks/csharp/exercises/difference-of-squares/README.md +30 -0
- data/tracks/csharp/exercises/diffie-hellman/README.md +55 -0
- data/tracks/csharp/exercises/dominoes/README.md +24 -0
- data/tracks/csharp/exercises/dot-dsl/README.md +37 -0
- data/tracks/csharp/exercises/error-handling/README.md +19 -0
- data/tracks/csharp/exercises/etl/README.md +57 -0
- data/tracks/csharp/exercises/flatten-array/README.md +24 -0
- data/tracks/csharp/exercises/food-chain/README.md +80 -0
- data/tracks/csharp/exercises/forth/README.md +39 -0
- data/tracks/csharp/exercises/gigasecond/README.md +17 -0
- data/tracks/csharp/exercises/go-counting/README.md +43 -0
- data/tracks/csharp/exercises/grade-school/README.md +48 -0
- data/tracks/csharp/exercises/grains/README.md +40 -0
- data/tracks/csharp/exercises/grep/README.md +77 -0
- data/tracks/csharp/exercises/hamming/README.md +48 -0
- data/tracks/csharp/exercises/hangman/README.md +32 -0
- data/tracks/csharp/exercises/hello-world/README.md +27 -0
- data/tracks/csharp/exercises/house/README.md +123 -0
- data/tracks/csharp/exercises/isogram/README.md +25 -0
- data/tracks/csharp/exercises/kindergarten-garden/README.md +72 -0
- data/tracks/csharp/exercises/largest-series-product/README.md +26 -0
- data/tracks/csharp/exercises/leap/README.md +39 -0
- data/tracks/csharp/exercises/ledger/README.md +24 -0
- data/tracks/csharp/exercises/linked-list/README.md +40 -0
- data/tracks/csharp/exercises/list-ops/README.md +19 -0
- data/tracks/csharp/exercises/luhn/README.md +77 -0
- data/tracks/csharp/exercises/markdown/README.md +28 -0
- data/tracks/csharp/exercises/matrix/README.md +51 -0
- data/tracks/csharp/exercises/meetup/README.md +36 -0
- data/tracks/csharp/exercises/minesweeper/README.md +36 -0
- data/tracks/csharp/exercises/nth-prime/README.md +29 -0
- data/tracks/csharp/exercises/nucleotide-count/README.md +43 -0
- data/tracks/csharp/exercises/ocr-numbers/README.md +91 -0
- data/tracks/csharp/exercises/palindrome-products/README.md +51 -0
- data/tracks/csharp/exercises/pangram/README.md +21 -0
- data/tracks/csharp/exercises/parallel-letter-frequency/README.md +17 -0
- data/tracks/csharp/exercises/pascals-triangle/README.md +27 -0
- data/tracks/csharp/exercises/perfect-numbers/README.md +30 -0
- data/tracks/csharp/exercises/phone-number/README.md +40 -0
- data/tracks/csharp/exercises/pig-latin/README.md +30 -0
- data/tracks/csharp/exercises/poker/README.md +18 -0
- data/tracks/csharp/exercises/pov/README.md +52 -0
- data/tracks/csharp/exercises/prime-factors/README.md +42 -0
- data/tracks/csharp/exercises/protein-translation/README.md +55 -0
- data/tracks/csharp/exercises/proverb/README.md +28 -0
- data/tracks/csharp/exercises/pythagorean-triplet/README.md +30 -0
- data/tracks/csharp/exercises/queen-attack/README.md +39 -0
- data/tracks/csharp/exercises/rail-fence-cipher/README.md +66 -0
- data/tracks/csharp/exercises/raindrops/README.md +30 -0
- data/tracks/csharp/exercises/react/README.md +29 -0
- data/tracks/csharp/exercises/rectangles/README.md +73 -0
- data/tracks/csharp/exercises/rna-transcription/README.md +31 -0
- data/tracks/csharp/exercises/robot-name/README.md +28 -0
- data/tracks/csharp/exercises/robot-simulator/README.md +40 -0
- data/tracks/csharp/exercises/roman-numerals/README.md +59 -0
- data/tracks/csharp/exercises/rotational-cipher/README.md +42 -0
- data/tracks/csharp/exercises/run-length-encoding/README.md +36 -0
- data/tracks/csharp/exercises/saddle-points/README.md +44 -0
- data/tracks/csharp/exercises/say/README.md +75 -0
- data/tracks/csharp/exercises/scale-generator/README.md +66 -0
- data/tracks/csharp/exercises/scrabble-score/README.md +50 -0
- data/tracks/csharp/exercises/secret-handshake/README.md +41 -0
- data/tracks/csharp/exercises/series/README.md +33 -0
- data/tracks/csharp/exercises/sgf-parsing/README.md +78 -0
- data/tracks/csharp/exercises/sieve/README.md +40 -0
- data/tracks/csharp/exercises/simple-cipher/README.md +96 -0
- data/tracks/csharp/exercises/simple-linked-list/README.md +38 -0
- data/tracks/csharp/exercises/space-age/README.md +30 -0
- data/tracks/csharp/exercises/strain/README.md +46 -0
- data/tracks/csharp/exercises/sublist/README.md +32 -0
- data/tracks/csharp/exercises/sum-of-multiples/README.md +28 -0
- data/tracks/csharp/exercises/tournament/README.md +74 -0
- data/tracks/csharp/exercises/transpose/README.md +71 -0
- data/tracks/csharp/exercises/tree-building/README.md +36 -0
- data/tracks/csharp/exercises/triangle/README.md +32 -0
- data/tracks/csharp/exercises/twelve-days/README.md +45 -0
- data/tracks/csharp/exercises/two-bucket/README.md +42 -0
- data/tracks/csharp/exercises/variable-length-quantity/README.md +50 -0
- data/tracks/csharp/exercises/word-count/README.md +25 -0
- data/tracks/csharp/exercises/word-search/README.md +43 -0
- data/tracks/csharp/exercises/wordy/README.md +73 -0
- data/tracks/csharp/exercises/zebra-puzzle/README.md +43 -0
- data/tracks/csharp/exercises/zipper/README.md +41 -0
- data/tracks/dart/config/exercise_readme.go.tmpl +16 -0
- data/tracks/dart/exercises/bob/README.md +18 -0
- data/tracks/dart/exercises/difference-of-squares/README.md +19 -0
- data/tracks/dart/exercises/gigasecond/README.md +11 -0
- data/tracks/dart/exercises/hamming/README.md +42 -0
- data/tracks/dart/exercises/hello-world/README.md +21 -0
- data/tracks/dart/exercises/leap/README.md +33 -0
- data/tracks/dart/exercises/rna-transcription/README.md +25 -0
- data/tracks/delphi/config.json +25 -32
- data/tracks/elixir/config.json +255 -3
- data/tracks/elixir/config/exercise_readme.go.tmpl +16 -0
- data/tracks/elixir/exercises/accumulate/README.md +72 -0
- data/tracks/elixir/exercises/acronym/README.md +52 -0
- data/tracks/elixir/exercises/all-your-base/README.md +72 -0
- data/tracks/elixir/exercises/allergies/README.md +74 -0
- data/tracks/elixir/exercises/anagram/README.md +50 -0
- data/tracks/elixir/exercises/atbash-cipher/README.md +71 -0
- data/tracks/elixir/exercises/bank-account/README.md +67 -0
- data/tracks/elixir/exercises/beer-song/README.md +364 -0
- data/tracks/elixir/exercises/binary-search/README.md +78 -0
- data/tracks/elixir/exercises/binary/README.md +72 -0
- data/tracks/elixir/exercises/bob/README.md +55 -0
- data/tracks/elixir/exercises/bowling/README.md +90 -0
- data/tracks/elixir/exercises/bowling/bowling_test.exs +91 -18
- data/tracks/elixir/exercises/bowling/example.exs +4 -4
- data/tracks/elixir/exercises/bracket-push/README.md +47 -0
- data/tracks/elixir/exercises/change/README.md +60 -0
- data/tracks/elixir/exercises/clock/README.md +50 -0
- data/tracks/elixir/exercises/collatz-conjecture/README.md +70 -0
- data/tracks/elixir/exercises/connect/README.md +71 -0
- data/tracks/elixir/exercises/crypto-square/README.md +111 -0
- data/tracks/elixir/exercises/custom-set/README.md +48 -0
- data/tracks/elixir/exercises/diamond/README.md +96 -0
- data/tracks/elixir/exercises/difference-of-squares/README.md +56 -0
- data/tracks/elixir/exercises/diffie-hellman/README.md +93 -0
- data/tracks/elixir/exercises/dominoes/README.md +55 -0
- data/tracks/elixir/exercises/dot-dsl/README.md +65 -0
- data/tracks/elixir/exercises/etl/README.md +88 -0
- data/tracks/elixir/exercises/flatten-array/README.md +55 -0
- data/tracks/elixir/exercises/forth/README.md +66 -0
- data/tracks/elixir/exercises/gigasecond/README.md +48 -0
- data/tracks/elixir/exercises/grade-school/README.md +79 -0
- data/tracks/elixir/exercises/grains/README.md +71 -0
- data/tracks/elixir/exercises/grep/README.md +108 -0
- data/tracks/elixir/exercises/hamming/README.md +79 -0
- data/tracks/elixir/exercises/hello-world/README.md +58 -0
- data/tracks/elixir/exercises/hexadecimal/README.md +51 -0
- data/tracks/elixir/exercises/isogram/README.md +56 -0
- data/tracks/elixir/exercises/kindergarten-garden/README.md +103 -0
- data/tracks/elixir/exercises/largest-series-product/README.md +57 -0
- data/tracks/elixir/exercises/leap/README.md +70 -0
- data/tracks/elixir/exercises/list-ops/README.md +47 -0
- data/tracks/elixir/exercises/luhn/README.md +108 -0
- data/tracks/elixir/exercises/markdown/README.md +55 -0
- data/tracks/elixir/exercises/matrix/README.md +82 -0
- data/tracks/elixir/exercises/meetup/README.md +67 -0
- data/tracks/elixir/exercises/minesweeper/README.md +67 -0
- data/tracks/elixir/exercises/nth-prime/README.md +52 -0
- data/tracks/elixir/exercises/nucleotide-count/README.md +70 -0
- data/tracks/elixir/exercises/ocr-numbers/README.md +122 -0
- data/tracks/elixir/exercises/palindrome-products/README.md +77 -0
- data/tracks/elixir/exercises/pangram/README.md +52 -0
- data/tracks/elixir/exercises/parallel-letter-frequency/README.md +48 -0
- data/tracks/elixir/exercises/pascals-triangle/README.md +58 -0
- data/tracks/elixir/exercises/perfect-numbers/README.md +61 -0
- data/tracks/elixir/exercises/phone-number/README.md +71 -0
- data/tracks/elixir/exercises/pig-latin/README.md +61 -0
- data/tracks/elixir/exercises/poker/README.md +49 -0
- data/tracks/elixir/exercises/prime-factors/README.md +73 -0
- data/tracks/elixir/exercises/protein-translation/README.md +86 -0
- data/tracks/elixir/exercises/pythagorean-triplet/README.md +61 -0
- data/tracks/elixir/exercises/queen-attack/README.md +70 -0
- data/tracks/elixir/exercises/rail-fence-cipher/README.md +97 -0
- data/tracks/elixir/exercises/raindrops/README.md +61 -0
- data/tracks/elixir/exercises/rna-transcription/README.md +62 -0
- data/tracks/elixir/exercises/robot-simulator/README.md +71 -0
- data/tracks/elixir/exercises/roman-numerals/README.md +86 -0
- data/tracks/elixir/exercises/rotational-cipher/README.md +73 -0
- data/tracks/elixir/exercises/run-length-encoding/README.md +67 -0
- data/tracks/elixir/exercises/saddle-points/README.md +70 -0
- data/tracks/elixir/exercises/say/README.md +106 -0
- data/tracks/elixir/exercises/scale-generator/README.md +97 -0
- data/tracks/elixir/exercises/scrabble-score/README.md +81 -0
- data/tracks/elixir/exercises/secret-handshake/README.md +94 -0
- data/tracks/elixir/exercises/series/README.md +64 -0
- data/tracks/elixir/exercises/sieve/README.md +71 -0
- data/tracks/elixir/exercises/simple-cipher/README.md +127 -0
- data/tracks/elixir/exercises/simple-linked-list/README.md +65 -0
- data/tracks/elixir/exercises/space-age/README.md +61 -0
- data/tracks/elixir/exercises/strain/README.md +80 -0
- data/tracks/elixir/exercises/sublist/README.md +58 -0
- data/tracks/elixir/exercises/sum-of-multiples/README.md +55 -0
- data/tracks/elixir/exercises/tournament/README.md +110 -0
- data/tracks/elixir/exercises/triangle/README.md +63 -0
- data/tracks/elixir/exercises/twelve-days/README.md +72 -0
- data/tracks/elixir/exercises/word-count/README.md +56 -0
- data/tracks/elixir/exercises/wordy/README.md +100 -0
- data/tracks/elixir/exercises/zipper/README.md +68 -0
- data/tracks/fsharp/config/exercise_readme.go.tmpl +16 -0
- data/tracks/fsharp/exercises/accumulate/README.md +40 -0
- data/tracks/fsharp/exercises/acronym/README.md +15 -0
- data/tracks/fsharp/exercises/all-your-base/README.md +35 -0
- data/tracks/fsharp/exercises/allergies/README.md +37 -0
- data/tracks/fsharp/exercises/alphametics/README.md +41 -0
- data/tracks/fsharp/exercises/anagram/README.md +13 -0
- data/tracks/fsharp/exercises/atbash-cipher/README.md +34 -0
- data/tracks/fsharp/exercises/bank-account/README.md +30 -0
- data/tracks/fsharp/exercises/beer-song/README.md +331 -0
- data/tracks/fsharp/exercises/binary-search-tree/README.md +60 -0
- data/tracks/fsharp/exercises/binary-search/README.md +41 -0
- data/tracks/fsharp/exercises/bob/README.md +18 -0
- data/tracks/fsharp/exercises/book-store/README.md +74 -0
- data/tracks/fsharp/exercises/bowling/README.md +53 -0
- data/tracks/fsharp/exercises/bracket-push/README.md +10 -0
- data/tracks/fsharp/exercises/change/README.md +23 -0
- data/tracks/fsharp/exercises/circular-buffer/README.md +50 -0
- data/tracks/fsharp/exercises/clock/README.md +13 -0
- data/tracks/fsharp/exercises/connect/README.md +34 -0
- data/tracks/fsharp/exercises/crypto-square/README.md +74 -0
- data/tracks/fsharp/exercises/custom-set/README.md +11 -0
- data/tracks/fsharp/exercises/diamond/README.md +62 -0
- data/tracks/fsharp/exercises/difference-of-squares/README.md +25 -0
- data/tracks/fsharp/exercises/diffie-hellman/README.md +49 -0
- data/tracks/fsharp/exercises/dominoes/README.md +18 -0
- data/tracks/fsharp/exercises/dot-dsl/README.md +28 -0
- data/tracks/fsharp/exercises/error-handling/README.md +13 -0
- data/tracks/fsharp/exercises/etl/README.md +51 -0
- data/tracks/fsharp/exercises/food-chain/README.md +74 -0
- data/tracks/fsharp/exercises/forth/README.md +29 -0
- data/tracks/fsharp/exercises/gigasecond/README.md +15 -0
- data/tracks/fsharp/exercises/go-counting/README.md +37 -0
- data/tracks/fsharp/exercises/grade-school/README.md +47 -0
- data/tracks/fsharp/exercises/grains/README.md +39 -0
- data/tracks/fsharp/exercises/grep/README.md +71 -0
- data/tracks/fsharp/exercises/hamming/README.md +42 -0
- data/tracks/fsharp/exercises/hangman/README.md +21 -0
- data/tracks/fsharp/exercises/hello-world/README.md +21 -0
- data/tracks/fsharp/exercises/house/README.md +117 -0
- data/tracks/fsharp/exercises/isogram/README.md +19 -0
- data/tracks/fsharp/exercises/kindergarten-garden/README.md +66 -0
- data/tracks/fsharp/exercises/largest-series-product/README.md +20 -0
- data/tracks/fsharp/exercises/leap/README.md +33 -0
- data/tracks/fsharp/exercises/ledger/README.md +18 -0
- data/tracks/fsharp/exercises/lens-person/README.md +15 -0
- data/tracks/fsharp/exercises/linked-list/README.md +50 -0
- data/tracks/fsharp/exercises/list-ops/README.md +10 -0
- data/tracks/fsharp/exercises/luhn/README.md +71 -0
- data/tracks/fsharp/exercises/markdown/README.md +18 -0
- data/tracks/fsharp/exercises/matrix/README.md +45 -0
- data/tracks/fsharp/exercises/meetup/README.md +30 -0
- data/tracks/fsharp/exercises/minesweeper/README.md +30 -0
- data/tracks/fsharp/exercises/nth-prime/README.md +21 -0
- data/tracks/fsharp/exercises/nucleotide-count/README.md +33 -0
- data/tracks/fsharp/exercises/ocr-numbers/README.md +85 -0
- data/tracks/fsharp/exercises/palindrome-products/README.md +44 -0
- data/tracks/fsharp/exercises/pangram/README.md +15 -0
- data/tracks/fsharp/exercises/parallel-letter-frequency/README.md +15 -0
- data/tracks/fsharp/exercises/pascals-triangle/README.md +21 -0
- data/tracks/fsharp/exercises/perfect-numbers/README.md +24 -0
- data/tracks/fsharp/exercises/phone-number/README.md +34 -0
- data/tracks/fsharp/exercises/pig-latin/README.md +24 -0
- data/tracks/fsharp/exercises/poker/README.md +15 -0
- data/tracks/fsharp/exercises/pov/README.md +46 -0
- data/tracks/fsharp/exercises/prime-factors/README.md +36 -0
- data/tracks/fsharp/exercises/protein-translation/README.md +49 -0
- data/tracks/fsharp/exercises/proverb/README.md +22 -0
- data/tracks/fsharp/exercises/pythagorean-triplet/README.md +24 -0
- data/tracks/fsharp/exercises/queen-attack/README.md +33 -0
- data/tracks/fsharp/exercises/rail-fence-cipher/README.md +60 -0
- data/tracks/fsharp/exercises/raindrops/README.md +27 -0
- data/tracks/fsharp/exercises/react/README.md +19 -0
- data/tracks/fsharp/exercises/rectangles/README.md +67 -0
- data/tracks/fsharp/exercises/rna-transcription/README.md +29 -0
- data/tracks/fsharp/exercises/robot-name/README.md +22 -0
- data/tracks/fsharp/exercises/robot-simulator/README.md +34 -0
- data/tracks/fsharp/exercises/roman-numerals/README.md +49 -0
- data/tracks/fsharp/exercises/run-length-encoding/README.md +30 -0
- data/tracks/fsharp/exercises/saddle-points/README.md +33 -0
- data/tracks/fsharp/exercises/say/README.md +69 -0
- data/tracks/fsharp/exercises/scale-generator/README.md +60 -0
- data/tracks/fsharp/exercises/scrabble-score/README.md +44 -0
- data/tracks/fsharp/exercises/secret-handshake/README.md +35 -0
- data/tracks/fsharp/exercises/series/README.md +27 -0
- data/tracks/fsharp/exercises/sgf-parsing/README.md +68 -0
- data/tracks/fsharp/exercises/sieve/README.md +34 -0
- data/tracks/fsharp/exercises/simple-cipher/README.md +90 -0
- data/tracks/fsharp/exercises/simple-linked-list/README.md +28 -0
- data/tracks/fsharp/exercises/space-age/README.md +28 -0
- data/tracks/fsharp/exercises/strain/README.md +40 -0
- data/tracks/fsharp/exercises/sublist/README.md +21 -0
- data/tracks/fsharp/exercises/sum-of-multiples/README.md +18 -0
- data/tracks/fsharp/exercises/tournament/README.md +68 -0
- data/tracks/fsharp/exercises/transpose/README.md +65 -0
- data/tracks/fsharp/exercises/tree-building/README.md +30 -0
- data/tracks/fsharp/exercises/triangle/README.md +26 -0
- data/tracks/fsharp/exercises/twelve-days/README.md +39 -0
- data/tracks/fsharp/exercises/two-bucket/README.md +36 -0
- data/tracks/fsharp/exercises/variable-length-quantity/README.md +39 -0
- data/tracks/fsharp/exercises/word-count/README.md +19 -0
- data/tracks/fsharp/exercises/word-search/README.md +30 -0
- data/tracks/fsharp/exercises/wordy/README.md +68 -0
- data/tracks/fsharp/exercises/zebra-puzzle/README.md +32 -0
- data/tracks/fsharp/exercises/zipper/README.md +31 -0
- data/tracks/haskell/README.md +2 -2
- data/tracks/javascript/config.json +232 -4
- data/tracks/kotlin/config.json +8 -1
- data/tracks/kotlin/exercises/rotational-cipher/build.gradle +28 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/example/kotlin/RotationalCipher.kt +18 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/main/kotlin/.keep +0 -0
- data/tracks/kotlin/exercises/rotational-cipher/src/test/kotlin/RotationalCipherTest.kt +81 -0
- data/tracks/kotlin/exercises/settings.gradle +1 -0
- data/tracks/powershell/config/exercise_readme.go.tmpl +16 -0
- data/tracks/powershell/exercises/hamming/README.md +42 -0
- data/tracks/powershell/exercises/hello-world/README.md +21 -0
- data/tracks/purescript/README.md +4 -4
- data/tracks/scala/config.json +266 -6
- data/tracks/scala/config/exercise_readme.go.tmpl +16 -0
- data/tracks/scala/exercises/accumulate/README.md +46 -0
- data/tracks/scala/exercises/acronym/README.md +26 -0
- data/tracks/scala/exercises/all-your-base/README.md +46 -0
- data/tracks/scala/exercises/allergies/README.md +48 -0
- data/tracks/scala/exercises/alphametics/README.md +46 -0
- data/tracks/scala/exercises/anagram/README.md +24 -0
- data/tracks/scala/exercises/atbash-cipher/README.md +45 -0
- data/tracks/scala/exercises/bank-account/README.md +54 -0
- data/tracks/scala/exercises/beer-song/README.md +338 -0
- data/tracks/scala/exercises/binary-search-tree/README.md +71 -0
- data/tracks/scala/exercises/binary-search/README.md +52 -0
- data/tracks/scala/exercises/binary/README.md +46 -0
- data/tracks/scala/exercises/bob/README.md +29 -0
- data/tracks/scala/exercises/book-store/README.md +85 -0
- data/tracks/scala/exercises/bowling/README.md +64 -0
- data/tracks/scala/exercises/bracket-push/README.md +21 -0
- data/tracks/scala/exercises/change/README.md +34 -0
- data/tracks/scala/exercises/clock/README.md +24 -0
- data/tracks/scala/exercises/connect/README.md +53 -0
- data/tracks/scala/exercises/crypto-square/README.md +85 -0
- data/tracks/scala/exercises/custom-set/README.md +22 -0
- data/tracks/scala/exercises/difference-of-squares/README.md +30 -0
- data/tracks/scala/exercises/dominoes/README.md +29 -0
- data/tracks/scala/exercises/etl/README.md +62 -0
- data/tracks/scala/exercises/food-chain/README.md +81 -0
- data/tracks/scala/exercises/forth/README.md +40 -0
- data/tracks/scala/exercises/gigasecond/README.md +26 -0
- data/tracks/scala/exercises/grade-school/README.md +53 -0
- data/tracks/scala/exercises/grains/README.md +45 -0
- data/tracks/scala/exercises/hamming/README.md +112 -0
- data/tracks/scala/exercises/hello-world/README.md +38 -0
- data/tracks/scala/exercises/hexadecimal/README.md +25 -0
- data/tracks/scala/exercises/house/README.md +124 -0
- data/tracks/scala/exercises/isogram/README.md +30 -0
- data/tracks/scala/exercises/kindergarten-garden/README.md +77 -0
- data/tracks/scala/exercises/largest-series-product/README.md +31 -0
- data/tracks/scala/exercises/leap/README.md +50 -0
- data/tracks/scala/exercises/lens-person/README.md +11 -7
- data/tracks/scala/exercises/linked-list/README.md +45 -0
- data/tracks/scala/exercises/luhn/README.md +82 -0
- data/tracks/scala/exercises/matrix/README.md +56 -0
- data/tracks/scala/exercises/meetup/README.md +41 -0
- data/tracks/scala/exercises/minesweeper/README.md +41 -0
- data/tracks/scala/exercises/nth-prime/README.md +26 -0
- data/tracks/scala/exercises/nucleotide-count/README.md +107 -0
- data/tracks/scala/exercises/ocr-numbers/README.md +96 -0
- data/tracks/scala/exercises/octal/README.md +60 -0
- data/tracks/scala/exercises/palindrome-products/README.md +51 -0
- data/tracks/scala/exercises/pangram/README.md +26 -0
- data/tracks/scala/exercises/parallel-letter-frequency/README.md +50 -0
- data/tracks/scala/exercises/pascals-triangle/README.md +32 -0
- data/tracks/scala/exercises/perfect-numbers/README.md +35 -0
- data/tracks/scala/exercises/phone-number/README.md +56 -0
- data/tracks/scala/exercises/pig-latin/README.md +35 -0
- data/tracks/scala/exercises/prime-factors/README.md +47 -0
- data/tracks/scala/exercises/protein-translation/README.md +60 -0
- data/tracks/scala/exercises/pythagorean-triplet/README.md +35 -0
- data/tracks/scala/exercises/queen-attack/README.md +44 -0
- data/tracks/scala/exercises/rail-fence-cipher/README.md +71 -0
- data/tracks/scala/exercises/raindrops/README.md +35 -0
- data/tracks/scala/exercises/rna-transcription/README.md +36 -0
- data/tracks/scala/exercises/robot-name/README.md +40 -0
- data/tracks/scala/exercises/robot-simulator/README.md +45 -0
- data/tracks/scala/exercises/roman-numerals/README.md +72 -0
- data/tracks/scala/exercises/run-length-encoding/README.md +41 -0
- data/tracks/scala/exercises/saddle-points/README.md +44 -0
- data/tracks/scala/exercises/say/README.md +80 -0
- data/tracks/scala/exercises/scrabble-score/README.md +55 -0
- data/tracks/scala/exercises/secret-handshake/README.md +46 -0
- data/tracks/scala/exercises/series/README.md +38 -0
- data/tracks/scala/exercises/sgf-parsing/README.md +79 -0
- data/tracks/scala/exercises/sieve/README.md +45 -0
- data/tracks/scala/exercises/simple-cipher/README.md +101 -0
- data/tracks/scala/exercises/simple-linked-list/README.md +39 -0
- data/tracks/scala/exercises/space-age/README.md +35 -0
- data/tracks/scala/exercises/spiral-matrix/README.md +41 -0
- data/tracks/scala/exercises/strain/README.md +51 -0
- data/tracks/scala/exercises/sublist/README.md +32 -0
- data/tracks/scala/exercises/sum-of-multiples/README.md +29 -0
- data/tracks/scala/exercises/triangle/README.md +37 -0
- data/tracks/scala/exercises/trinary/README.md +39 -0
- data/tracks/scala/exercises/variable-length-quantity/README.md +54 -0
- data/tracks/scala/exercises/word-count/README.md +30 -0
- data/tracks/scala/exercises/wordy/README.md +74 -0
- data/tracks/scala/exercises/zebra-puzzle/README.md +43 -0
- data/tracks/scala/exercises/zipper/README.md +42 -0
- metadata +401 -1
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
## Hints
|
|
39
|
+
`Option` is used to indicate a computation that may possibly have no useful result
|
|
40
|
+
(for example due to an error or invalid input).
|
|
41
|
+
If you are unfamiliar with `Option` you may read [this tutorial](http://danielwestheide.com/blog/2012/12/19/the-neophytes-guide-to-scala-part-5-the-option-type.html).
|
|
42
|
+
`Option` is a so-called [Monad](https://en.wikipedia.org/wiki/Monad_(functional_programming)) which covers a "computational aspect", in this case possible absence of a value.
|
|
43
|
+
Proper use of Monads can result in very concise yet elegant
|
|
44
|
+
and readable code. Improper use can easily result in the contrary.
|
|
45
|
+
Watch [this video](https://www.youtube.com/watch?v=Mw_Jnn_Y5iA) to learn more.
|
|
46
|
+
#### Common pitfalls that you should avoid
|
|
47
|
+
There are a few rules of thumbs for `Option`:
|
|
48
|
+
1. If you don't need it don't use it. Instead of
|
|
49
|
+
```scala
|
|
50
|
+
def add1(x: Int): Option[Int] = Some(x + 1)
|
|
51
|
+
```
|
|
52
|
+
better have
|
|
53
|
+
```scala
|
|
54
|
+
def add1(x: Int): Int = x + 1
|
|
55
|
+
```
|
|
56
|
+
(there is `Option.map` to apply such simple functions,
|
|
57
|
+
so you don't have to clutter them with `Option`).
|
|
58
|
+
2. Don't "unwrap" if you don't really need to.
|
|
59
|
+
Often there are built-in functions for your purpose. Indicators of premature
|
|
60
|
+
unwrapping are `isDefined/isEmpty` or pattern matching. Instead of
|
|
61
|
+
```scala
|
|
62
|
+
val x: Option[Int] = ...
|
|
63
|
+
|
|
64
|
+
if (x.isDefined) x.get + 1 else 0
|
|
65
|
+
// or
|
|
66
|
+
x match {
|
|
67
|
+
case Some(n) => n + 1
|
|
68
|
+
case None => 0
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
better have
|
|
72
|
+
```scala
|
|
73
|
+
x map (_ + 1) getOrElse 0
|
|
74
|
+
```
|
|
75
|
+
3. Monads can be used inside a for-comprehension FTW.
|
|
76
|
+
This is advisable when you want to "compose" several `Option` instances. Instead of
|
|
77
|
+
```scala
|
|
78
|
+
val xo: Option[Int] = ...
|
|
79
|
+
val yo: Option[Int] = ...
|
|
80
|
+
val zo: Option[Int] = ...
|
|
81
|
+
|
|
82
|
+
xo.flatMap(x =>
|
|
83
|
+
yo.flatMap(y =>
|
|
84
|
+
zo.map(z =>
|
|
85
|
+
x + y + z)))
|
|
86
|
+
```
|
|
87
|
+
better have
|
|
88
|
+
```scala
|
|
89
|
+
for {
|
|
90
|
+
x <- xo
|
|
91
|
+
y <- yo
|
|
92
|
+
z <- zo
|
|
93
|
+
} yield x + y + z
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
98
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
99
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
100
|
+
|
|
101
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
102
|
+
|
|
103
|
+
For more detailed info about the Scala track see the [help
|
|
104
|
+
page](http://exercism.io/languages/scala).
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## Source
|
|
108
|
+
|
|
109
|
+
The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/)
|
|
110
|
+
|
|
111
|
+
## Submitting Incomplete Solutions
|
|
112
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
## Hints
|
|
18
|
+
|
|
19
|
+
#### Common pitfalls that you should avoid
|
|
20
|
+
- Usually there is no need in Scala to use `return`. For a discussion see [here](http://stackoverflow.com/questions/24856106/return-in-a-scala-function-literal). Or as a quote from that discussion: *Don't use return, it makes Scala cry.*
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
24
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
25
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
26
|
+
|
|
27
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
28
|
+
|
|
29
|
+
For more detailed info about the Scala track see the [help
|
|
30
|
+
page](http://exercism.io/languages/scala).
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Source
|
|
34
|
+
|
|
35
|
+
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)
|
|
36
|
+
|
|
37
|
+
## Submitting Incomplete Solutions
|
|
38
|
+
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
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
11
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
12
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
13
|
+
|
|
14
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
15
|
+
|
|
16
|
+
For more detailed info about the Scala track see the [help
|
|
17
|
+
page](http://exercism.io/languages/scala).
|
|
18
|
+
|
|
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
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
110
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
111
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
112
|
+
|
|
113
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
114
|
+
|
|
115
|
+
For more detailed info about the Scala track see the [help
|
|
116
|
+
page](http://exercism.io/languages/scala).
|
|
117
|
+
|
|
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
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
16
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
17
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
18
|
+
|
|
19
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
20
|
+
|
|
21
|
+
For more detailed info about the Scala track see the [help
|
|
22
|
+
page](http://exercism.io/languages/scala).
|
|
23
|
+
|
|
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
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
63
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
64
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
65
|
+
|
|
66
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
67
|
+
|
|
68
|
+
For more detailed info about the Scala track see the [help
|
|
69
|
+
page](http://exercism.io/languages/scala).
|
|
70
|
+
|
|
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
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
17
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
18
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
19
|
+
|
|
20
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
21
|
+
|
|
22
|
+
For more detailed info about the Scala track see the [help
|
|
23
|
+
page](http://exercism.io/languages/scala).
|
|
24
|
+
|
|
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,50 @@
|
|
|
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
|
+
## Hints
|
|
30
|
+
Try to avoid code repetition, use private helper functions if you can.
|
|
31
|
+
|
|
32
|
+
And you might consider using a single `Boolean` expression instead of `if-else` for better readability. See [here](http://cs.wellesley.edu/~cs111/spring00/lectures/boolean-simplification.html) on how this could be done (the link is for Java, but of course the logic is valid for Scala, too).
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
The Scala exercises assume an SBT project scheme. The exercise solution source
|
|
36
|
+
should be placed within the exercise directory/src/main/scala. The exercise
|
|
37
|
+
unit tests can be found within the exercise directory/src/test/scala.
|
|
38
|
+
|
|
39
|
+
To run the tests simply run the command `sbt test` in the exercise directory.
|
|
40
|
+
|
|
41
|
+
For more detailed info about the Scala track see the [help
|
|
42
|
+
page](http://exercism.io/languages/scala).
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Source
|
|
46
|
+
|
|
47
|
+
JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp)
|
|
48
|
+
|
|
49
|
+
## Submitting Incomplete Solutions
|
|
50
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|