trackler 2.2.0.2 → 2.2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- 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,44 @@
|
|
1
|
+
# Scrabble Score
|
2
|
+
|
3
|
+
Given a word, compute the scrabble score for that word.
|
4
|
+
|
5
|
+
## Letter Values
|
6
|
+
|
7
|
+
You'll need these:
|
8
|
+
|
9
|
+
```plain
|
10
|
+
Letter Value
|
11
|
+
A, E, I, O, U, L, N, R, S, T 1
|
12
|
+
D, G 2
|
13
|
+
B, C, M, P 3
|
14
|
+
F, H, V, W, Y 4
|
15
|
+
K 5
|
16
|
+
J, X 8
|
17
|
+
Q, Z 10
|
18
|
+
```
|
19
|
+
|
20
|
+
## Examples
|
21
|
+
"cabbage" should be scored as worth 14 points:
|
22
|
+
|
23
|
+
- 3 points for C
|
24
|
+
- 1 point for A, twice
|
25
|
+
- 3 points for B, twice
|
26
|
+
- 2 points for G
|
27
|
+
- 1 point for E
|
28
|
+
|
29
|
+
And to total:
|
30
|
+
|
31
|
+
- `3 + 2*1 + 2*3 + 2 + 1`
|
32
|
+
- = `3 + 2 + 6 + 3`
|
33
|
+
- = `5 + 9`
|
34
|
+
- = 14
|
35
|
+
|
36
|
+
## Extensions
|
37
|
+
- You can play a double or a triple letter.
|
38
|
+
- You can play a double or a triple word.
|
39
|
+
## Source
|
40
|
+
|
41
|
+
Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup)
|
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,35 @@
|
|
1
|
+
# Secret Handshake
|
2
|
+
|
3
|
+
> There are 10 types of people in the world: Those who understand
|
4
|
+
> binary, and those who don't.
|
5
|
+
|
6
|
+
You and your fellow cohort of those in the "know" when it comes to
|
7
|
+
binary decide to come up with a secret "handshake".
|
8
|
+
|
9
|
+
```
|
10
|
+
1 = wink
|
11
|
+
10 = double blink
|
12
|
+
100 = close your eyes
|
13
|
+
1000 = jump
|
14
|
+
|
15
|
+
|
16
|
+
10000 = Reverse the order of the operations in the secret handshake.
|
17
|
+
```
|
18
|
+
|
19
|
+
Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
|
20
|
+
|
21
|
+
Here's a couple of examples:
|
22
|
+
|
23
|
+
Given the input 3, the function would return the array
|
24
|
+
["wink", "double blink"] because 3 is 11 in binary.
|
25
|
+
|
26
|
+
Given the input 19, the function would return the array
|
27
|
+
["double blink", "wink"] because 19 is 10011 in binary.
|
28
|
+
Notice that the addition of 16 (10000 in binary)
|
29
|
+
has caused the array to be reversed.
|
30
|
+
## Source
|
31
|
+
|
32
|
+
Bert, in Mary Poppins [http://www.imdb.com/character/ch0011238/quotes](http://www.imdb.com/character/ch0011238/quotes)
|
33
|
+
|
34
|
+
## Submitting Incomplete Solutions
|
35
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Series
|
2
|
+
|
3
|
+
Given a string of digits, output all the contiguous substrings of length `n` in
|
4
|
+
that string.
|
5
|
+
|
6
|
+
For example, the string "49142" has the following 3-digit series:
|
7
|
+
|
8
|
+
- 491
|
9
|
+
- 914
|
10
|
+
- 142
|
11
|
+
|
12
|
+
And the following 4-digit series:
|
13
|
+
|
14
|
+
- 4914
|
15
|
+
- 9142
|
16
|
+
|
17
|
+
And if you ask for a 6-digit series from a 5-digit string, you deserve
|
18
|
+
whatever you get.
|
19
|
+
|
20
|
+
Note that these series are only required to occupy *adjacent positions*
|
21
|
+
in the input; the digits need not be *numerically consecutive*.
|
22
|
+
## Source
|
23
|
+
|
24
|
+
A subset of the Problem 8 at Project Euler [http://projecteuler.net/problem=8](http://projecteuler.net/problem=8)
|
25
|
+
|
26
|
+
## Submitting Incomplete Solutions
|
27
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Sgf Parsing
|
2
|
+
|
3
|
+
Parsing a Smart Game Format string.
|
4
|
+
|
5
|
+
[SGF](https://en.wikipedia.org/wiki/Smart_Game_Format) is a standard format for
|
6
|
+
storing board game files, in particular go.
|
7
|
+
|
8
|
+
SGF is a fairly simple format. An SGF file usually contains a single
|
9
|
+
tree of nodes where each node is a property list. The property list
|
10
|
+
contains key value pairs, each key can only occur once but may have
|
11
|
+
multiple values.
|
12
|
+
|
13
|
+
An SGF file may look like this:
|
14
|
+
|
15
|
+
```
|
16
|
+
(;FF[4]C[root]SZ[19];B[aa];W[ab])
|
17
|
+
```
|
18
|
+
|
19
|
+
This is a tree with three nodes:
|
20
|
+
|
21
|
+
- The top level node has two properties: FF\[4\] (key = "FF", value =
|
22
|
+
"4") and C\[root\](key = "C", value = "root"). (FF indicates the
|
23
|
+
version of SGF and C is a comment.)
|
24
|
+
- The top level node has a single child which has a single property:
|
25
|
+
B\[aa\]. (Black plays on the point encoded as "aa", which is the
|
26
|
+
1-1 point (which is a stupid place to play)).
|
27
|
+
- The B\[aa\] node has a single child which has a single property:
|
28
|
+
W\[ab\].
|
29
|
+
|
30
|
+
As you can imagine an SGF file contains a lot of nodes with a single
|
31
|
+
child, which is why there's a shorthand for it.
|
32
|
+
|
33
|
+
SGF can encode variations of play. Go players do a lot of backtracking
|
34
|
+
in their reviews (let's try this, doesn't work, let's try that) and SGF
|
35
|
+
supports variations of play sequences. For example:
|
36
|
+
|
37
|
+
```
|
38
|
+
(;FF[4](;B[aa];W[ab])(;B[dd];W[ee]))
|
39
|
+
```
|
40
|
+
|
41
|
+
Here the root node has two variations. The first (which by convention
|
42
|
+
indicates what's actually played) is where black plays on 1-1. Black was
|
43
|
+
sent this file by his teacher who pointed out a more sensible play in
|
44
|
+
the second child of the root node: `B[dd]` (4-4 point, a very standard
|
45
|
+
opening to take the corner).
|
46
|
+
|
47
|
+
A key can have multiple values associated with it. For example:
|
48
|
+
|
49
|
+
```
|
50
|
+
(;FF[4];AB[aa][ab][ba])
|
51
|
+
```
|
52
|
+
|
53
|
+
Here `AB` (add black) is used to add three black stones to the board.
|
54
|
+
|
55
|
+
There are a few more complexities to SGF (and parsing in general), which
|
56
|
+
you can mostly ignore. You should assume that the input is encoded in
|
57
|
+
UTF-8, the tests won't contain a charset property, so don't worry about
|
58
|
+
that. Furthermore you may assume that all newlines are unix style (`\n`,
|
59
|
+
no `\r` or `\r\n` will be in the tests) and that no optional whitespace
|
60
|
+
between properties, nodes, etc will be in the tests.
|
61
|
+
|
62
|
+
The exercise will have you parse an SGF string and return a tree
|
63
|
+
structure of properties. You do not need to encode knowledge about the
|
64
|
+
data types of properties, just use the rules for the
|
65
|
+
[text](http://www.red-bean.com/sgf/sgf4.html#text) type everywhere.
|
66
|
+
|
67
|
+
## Submitting Incomplete Solutions
|
68
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Sieve
|
2
|
+
|
3
|
+
Use the Sieve of Eratosthenes to find all the primes from 2 up to a given
|
4
|
+
number.
|
5
|
+
|
6
|
+
The Sieve of Eratosthenes is a simple, ancient algorithm for finding all
|
7
|
+
prime numbers up to any given limit. It does so by iteratively marking as
|
8
|
+
composite (i.e. not prime) the multiples of each prime,
|
9
|
+
starting with the multiples of 2.
|
10
|
+
|
11
|
+
Create your range, starting at two and continuing up to and including the given limit. (i.e. [2, limit])
|
12
|
+
|
13
|
+
The algorithm consists of repeating the following over and over:
|
14
|
+
|
15
|
+
- take the next available unmarked number in your list (it is prime)
|
16
|
+
- mark all the multiples of that number (they are not prime)
|
17
|
+
|
18
|
+
Repeat until you have processed each number in your range.
|
19
|
+
|
20
|
+
When the algorithm terminates, all the numbers in the list that have not
|
21
|
+
been marked are prime.
|
22
|
+
|
23
|
+
The wikipedia article has a useful graphic that explains the algorithm:
|
24
|
+
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
|
25
|
+
|
26
|
+
Notice that this is a very specific algorithm, and the tests don't check
|
27
|
+
that you've implemented the algorithm, only that you've come up with the
|
28
|
+
correct list of primes.
|
29
|
+
## Source
|
30
|
+
|
31
|
+
Sieve of Eratosthenes at Wikipedia [http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)
|
32
|
+
|
33
|
+
## Submitting Incomplete Solutions
|
34
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# Simple Cipher
|
2
|
+
|
3
|
+
Implement a simple shift cipher like Caesar and a more secure substitution cipher.
|
4
|
+
|
5
|
+
## Step 1
|
6
|
+
|
7
|
+
"If he had anything confidential to say, he wrote it in cipher, that is,
|
8
|
+
by so changing the order of the letters of the alphabet, that not a word
|
9
|
+
could be made out. If anyone wishes to decipher these, and get at their
|
10
|
+
meaning, he must substitute the fourth letter of the alphabet, namely D,
|
11
|
+
for A, and so with the others."
|
12
|
+
—Suetonius, Life of Julius Caesar
|
13
|
+
|
14
|
+
Ciphers are very straight-forward algorithms that allow us to render
|
15
|
+
text less readable while still allowing easy deciphering. They are
|
16
|
+
vulnerable to many forms of cryptoanalysis, but we are lucky that
|
17
|
+
generally our little sisters are not cryptoanalysts.
|
18
|
+
|
19
|
+
The Caesar Cipher was used for some messages from Julius Caesar that
|
20
|
+
were sent afield. Now Caesar knew that the cipher wasn't very good, but
|
21
|
+
he had one ally in that respect: almost nobody could read well. So even
|
22
|
+
being a couple letters off was sufficient so that people couldn't
|
23
|
+
recognize the few words that they did know.
|
24
|
+
|
25
|
+
Your task is to create a simple shift cipher like the Caesar Cipher.
|
26
|
+
This image is a great example of the Caesar Cipher:
|
27
|
+
|
28
|
+
![Caesar Cipher][1]
|
29
|
+
|
30
|
+
For example:
|
31
|
+
|
32
|
+
Giving "iamapandabear" as input to the encode function returns the cipher "ldpdsdqgdehdu". Obscure enough to keep our message secret in transit.
|
33
|
+
|
34
|
+
When "ldpdsdqgdehdu" is put into the decode function it would return
|
35
|
+
the original "iamapandabear" letting your friend read your original
|
36
|
+
message.
|
37
|
+
|
38
|
+
## Step 2
|
39
|
+
|
40
|
+
Shift ciphers are no fun though when your kid sister figures it out. Try
|
41
|
+
amending the code to allow us to specify a key and use that for the
|
42
|
+
shift distance. This is called a substitution cipher.
|
43
|
+
|
44
|
+
Here's an example:
|
45
|
+
|
46
|
+
Given the key "aaaaaaaaaaaaaaaaaa", encoding the string "iamapandabear"
|
47
|
+
would return the original "iamapandabear".
|
48
|
+
|
49
|
+
Given the key "ddddddddddddddddd", encoding our string "iamapandabear"
|
50
|
+
would return the obscured "lpdsdqgdehdu"
|
51
|
+
|
52
|
+
In the example above, we've set a = 0 for the key value. So when the
|
53
|
+
plaintext is added to the key, we end up with the same message coming
|
54
|
+
out. So "aaaa" is not an ideal key. But if we set the key to "dddd", we
|
55
|
+
would get the same thing as the Caesar Cipher.
|
56
|
+
|
57
|
+
## Step 3
|
58
|
+
|
59
|
+
The weakest link in any cipher is the human being. Let's make your
|
60
|
+
substitution cipher a little more fault tolerant by providing a source
|
61
|
+
of randomness and ensuring that the key is not composed of numbers or
|
62
|
+
capital letters.
|
63
|
+
|
64
|
+
If someone doesn't submit a key at all, generate a truly random key of
|
65
|
+
at least 100 characters in length, accessible via Cipher#key (the #
|
66
|
+
syntax means instance variable)
|
67
|
+
|
68
|
+
If the key submitted has capital letters or numbers, throw an
|
69
|
+
ArgumentError with a message to that effect.
|
70
|
+
|
71
|
+
## Extensions
|
72
|
+
|
73
|
+
Shift ciphers work by making the text slightly odd, but are vulnerable
|
74
|
+
to frequency analysis. Substitution ciphers help that, but are still
|
75
|
+
very vulnerable when the key is short or if spaces are preserved. Later
|
76
|
+
on you'll see one solution to this problem in the exercise
|
77
|
+
"crypto-square".
|
78
|
+
|
79
|
+
If you want to go farther in this field, the questions begin to be about
|
80
|
+
how we can exchange keys in a secure way. Take a look at [Diffie-Hellman
|
81
|
+
on Wikipedia][dh] for one of the first implementations of this scheme.
|
82
|
+
|
83
|
+
[1]: https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Caesar_cipher_left_shift_of_3.svg/320px-Caesar_cipher_left_shift_of_3.svg.png
|
84
|
+
[dh]: http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
|
85
|
+
## Source
|
86
|
+
|
87
|
+
Substitution Cipher at Wikipedia [http://en.wikipedia.org/wiki/Substitution_cipher](http://en.wikipedia.org/wiki/Substitution_cipher)
|
88
|
+
|
89
|
+
## Submitting Incomplete Solutions
|
90
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Simple Linked List
|
2
|
+
|
3
|
+
Write a simple linked list implementation that uses Elements and a List.
|
4
|
+
|
5
|
+
The linked list is a fundamental data structure in computer science,
|
6
|
+
often used in the implementation of other data structures. They're
|
7
|
+
pervasive in functional programming languages, such as Clojure, Erlang,
|
8
|
+
or Haskell, but far less common in imperative languages such as Ruby or
|
9
|
+
Python.
|
10
|
+
|
11
|
+
The simplest kind of linked list is a singly linked list. Each element in the
|
12
|
+
list contains data and a "next" field pointing to the next element in the list
|
13
|
+
of elements.
|
14
|
+
|
15
|
+
This variant of linked lists is often used to represent sequences or
|
16
|
+
push-down stacks (also called a LIFO stack; Last In, First Out).
|
17
|
+
|
18
|
+
As a first take, lets create a singly linked list to contain the range (1..10),
|
19
|
+
and provide functions to reverse a linked list and convert to and from arrays.
|
20
|
+
|
21
|
+
When implementing this in a language with built-in linked lists,
|
22
|
+
implement your own abstract data type.
|
23
|
+
## Source
|
24
|
+
|
25
|
+
Inspired by 'Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby', singly linked-lists. [http://www.brpreiss.com/books/opus8/html/page96.html#SECTION004300000000000000000](http://www.brpreiss.com/books/opus8/html/page96.html#SECTION004300000000000000000)
|
26
|
+
|
27
|
+
## Submitting Incomplete Solutions
|
28
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Space Age
|
2
|
+
|
3
|
+
Given an age in seconds, calculate how old someone would be on:
|
4
|
+
|
5
|
+
- Earth: orbital period 365.25 Earth days, or 31557600 seconds
|
6
|
+
- Mercury: orbital period 0.2408467 Earth years
|
7
|
+
- Venus: orbital period 0.61519726 Earth years
|
8
|
+
- Mars: orbital period 1.8808158 Earth years
|
9
|
+
- Jupiter: orbital period 11.862615 Earth years
|
10
|
+
- Saturn: orbital period 29.447498 Earth years
|
11
|
+
- Uranus: orbital period 84.016846 Earth years
|
12
|
+
- Neptune: orbital period 164.79132 Earth years
|
13
|
+
|
14
|
+
So if you were told someone were 1,000,000,000 seconds old, you should
|
15
|
+
be able to say that they're 31 Earth-years old.
|
16
|
+
|
17
|
+
If you're wondering why Pluto didn't make the cut, go watch [this
|
18
|
+
youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).
|
19
|
+
|
20
|
+
## Hints
|
21
|
+
- Try to focus on minimizing the amount of code duplication. If you find yourself doing a lot of copy/paste take a step back and think about how the code can be refactored
|
22
|
+
- [Pattern matching](https://fsharpforfunandprofit.com/posts/match-expression/) is more idiomatic than using dictionaries to translate values
|
23
|
+
## Source
|
24
|
+
|
25
|
+
Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01)
|
26
|
+
|
27
|
+
## Submitting Incomplete Solutions
|
28
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Strain
|
2
|
+
|
3
|
+
Implement the `keep` and `discard` operation on collections. Given a collection
|
4
|
+
and a predicate on the collection's elements, `keep` returns a new collection
|
5
|
+
containing those elements where the predicate is true, while `discard` returns
|
6
|
+
a new collection containing those elements where the predicate is false.
|
7
|
+
|
8
|
+
For example, given the collection of numbers:
|
9
|
+
|
10
|
+
- 1, 2, 3, 4, 5
|
11
|
+
|
12
|
+
And the predicate:
|
13
|
+
|
14
|
+
- is the number even?
|
15
|
+
|
16
|
+
Then your keep operation should produce:
|
17
|
+
|
18
|
+
- 2, 4
|
19
|
+
|
20
|
+
While your discard operation should produce:
|
21
|
+
|
22
|
+
- 1, 3, 5
|
23
|
+
|
24
|
+
Note that the union of keep and discard is all the elements.
|
25
|
+
|
26
|
+
The functions may be called `keep` and `discard`, or they may need different
|
27
|
+
names in order to not clash with existing functions or concepts in your
|
28
|
+
language.
|
29
|
+
|
30
|
+
## Restrictions
|
31
|
+
|
32
|
+
Keep your hands off that filter/reject/whatchamacallit functionality
|
33
|
+
provided by your standard library! Solve this one yourself using other
|
34
|
+
basic tools instead.
|
35
|
+
## Source
|
36
|
+
|
37
|
+
Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2)
|
38
|
+
|
39
|
+
## Submitting Incomplete Solutions
|
40
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Sublist
|
2
|
+
|
3
|
+
Given two lists determine if the first list is contained within the second
|
4
|
+
list, if the second list is contained within the first list, if both lists are
|
5
|
+
contained within each other or if none of these are true.
|
6
|
+
|
7
|
+
Specifically, a list A is a sublist of list B if by dropping 0 or more elements
|
8
|
+
from the front of B and 0 or more elements from the back of B you get a list
|
9
|
+
that's completely equal to A.
|
10
|
+
|
11
|
+
Examples:
|
12
|
+
|
13
|
+
* A = [1, 2, 3], B = [1, 2, 3, 4, 5], A is a sublist of B
|
14
|
+
* A = [3, 4, 5], B = [1, 2, 3, 4, 5], A is a sublist of B
|
15
|
+
* A = [3, 4], B = [1, 2, 3, 4, 5], A is a sublist of B
|
16
|
+
* A = [1, 2, 3], B = [1, 2, 3], A is equal to B
|
17
|
+
* A = [1, 2, 3, 4, 5], B = [2, 3, 4], A is a superlist of B
|
18
|
+
* A = [1, 2, 4], B = [1, 2, 3, 4, 5], A is not a superlist of, sublist of or equal to B
|
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,18 @@
|
|
1
|
+
# Sum Of Multiples
|
2
|
+
|
3
|
+
Given a number, find the sum of all the multiples of particular numbers up to
|
4
|
+
but not including that number.
|
5
|
+
|
6
|
+
If we list all the natural numbers up to but not including 20 that are
|
7
|
+
multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18.
|
8
|
+
|
9
|
+
The sum of these multiples is 78.
|
10
|
+
|
11
|
+
Given a number, find the sum of the multiples of a given set of numbers,
|
12
|
+
up to but not including that number.
|
13
|
+
## Source
|
14
|
+
|
15
|
+
A variation on Problem 1 at Project Euler [http://projecteuler.net/problem=1](http://projecteuler.net/problem=1)
|
16
|
+
|
17
|
+
## Submitting Incomplete Solutions
|
18
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|