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,60 @@
|
|
1
|
+
# Binary Search Tree
|
2
|
+
|
3
|
+
Insert and search for numbers in a binary tree.
|
4
|
+
|
5
|
+
When we need to represent sorted data, an array does not make a good
|
6
|
+
data structure.
|
7
|
+
|
8
|
+
Say we have the array `[1, 3, 4, 5]`, and we add 2 to it so it becomes
|
9
|
+
`[1, 3, 4, 5, 2]` now we must sort the entire array again! We can
|
10
|
+
improve on this by realizing that we only need to make space for the new
|
11
|
+
item `[1, nil, 3, 4, 5]`, and then adding the item in the space we
|
12
|
+
added. But this still requires us to shift many elements down by one.
|
13
|
+
|
14
|
+
Binary Search Trees, however, can operate on sorted data much more
|
15
|
+
efficiently.
|
16
|
+
|
17
|
+
A binary search tree consists of a series of connected nodes. Each node
|
18
|
+
contains a piece of data (e.g. the number 3), a variable named `left`,
|
19
|
+
and a variable named `right`. The `left` and `right` variables point at
|
20
|
+
`nil`, or other nodes. Since these other nodes in turn have other nodes
|
21
|
+
beneath them, we say that the left and right variables are pointing at
|
22
|
+
subtrees. All data in the left subtree is less than or equal to the
|
23
|
+
current node's data, and all data in the right subtree is greater than
|
24
|
+
the current node's data.
|
25
|
+
|
26
|
+
For example, if we had a node containing the data 4, and we added the
|
27
|
+
data 2, our tree would look like this:
|
28
|
+
|
29
|
+
4
|
30
|
+
/
|
31
|
+
2
|
32
|
+
|
33
|
+
If we then added 6, it would look like this:
|
34
|
+
|
35
|
+
4
|
36
|
+
/ \
|
37
|
+
2 6
|
38
|
+
|
39
|
+
If we then added 3, it would look like this
|
40
|
+
|
41
|
+
4
|
42
|
+
/ \
|
43
|
+
2 6
|
44
|
+
\
|
45
|
+
3
|
46
|
+
|
47
|
+
And if we then added 1, 5, and 7, it would look like this
|
48
|
+
|
49
|
+
4
|
50
|
+
/ \
|
51
|
+
/ \
|
52
|
+
2 6
|
53
|
+
/ \ / \
|
54
|
+
1 3 5 7
|
55
|
+
## Source
|
56
|
+
|
57
|
+
Josh Cheek [https://twitter.com/josh_cheek](https://twitter.com/josh_cheek)
|
58
|
+
|
59
|
+
## Submitting Incomplete Solutions
|
60
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Binary Search
|
2
|
+
|
3
|
+
Implement a binary search algorithm.
|
4
|
+
|
5
|
+
Searching a sorted collection is a common task. A dictionary is a sorted
|
6
|
+
list of word definitions. Given a word, one can find its definition. A
|
7
|
+
telephone book is a sorted list of people's names, addresses, and
|
8
|
+
telephone numbers. Knowing someone's name allows one to quickly find
|
9
|
+
their telephone number and address.
|
10
|
+
|
11
|
+
If the list to be searched contains more than a few items (a dozen, say)
|
12
|
+
a binary search will require far fewer comparisons than a linear search,
|
13
|
+
but it imposes the requirement that the list be sorted.
|
14
|
+
|
15
|
+
In computer science, a binary search or half-interval search algorithm
|
16
|
+
finds the position of a specified input value (the search "key") within
|
17
|
+
an array sorted by key value.
|
18
|
+
|
19
|
+
In each step, the algorithm compares the search key value with the key
|
20
|
+
value of the middle element of the array.
|
21
|
+
|
22
|
+
If the keys match, then a matching element has been found and its index,
|
23
|
+
or position, is returned.
|
24
|
+
|
25
|
+
Otherwise, if the search key is less than the middle element's key, then
|
26
|
+
the algorithm repeats its action on the sub-array to the left of the
|
27
|
+
middle element or, if the search key is greater, on the sub-array to the
|
28
|
+
right.
|
29
|
+
|
30
|
+
If the remaining array to be searched is empty, then the key cannot be
|
31
|
+
found in the array and a special "not found" indication is returned.
|
32
|
+
|
33
|
+
A binary search halves the number of items to check with each iteration,
|
34
|
+
so locating an item (or determining its absence) takes logarithmic time.
|
35
|
+
A binary search is a dichotomic divide and conquer search algorithm.
|
36
|
+
## Source
|
37
|
+
|
38
|
+
Wikipedia [http://en.wikipedia.org/wiki/Binary_search_algorithm](http://en.wikipedia.org/wiki/Binary_search_algorithm)
|
39
|
+
|
40
|
+
## Submitting Incomplete Solutions
|
41
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Bob
|
2
|
+
|
3
|
+
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
|
4
|
+
|
5
|
+
Bob answers 'Sure.' if you ask him a question.
|
6
|
+
|
7
|
+
He answers 'Whoa, chill out!' if you yell at him.
|
8
|
+
|
9
|
+
He says 'Fine. Be that way!' if you address him without actually saying
|
10
|
+
anything.
|
11
|
+
|
12
|
+
He answers 'Whatever.' to anything else.
|
13
|
+
## Source
|
14
|
+
|
15
|
+
Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06)
|
16
|
+
|
17
|
+
## Submitting Incomplete Solutions
|
18
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Book Store
|
2
|
+
|
3
|
+
To try and encourage more sales of different books from a popular 5 book
|
4
|
+
series, a bookshop has decided to offer discounts on multiple book purchases.
|
5
|
+
|
6
|
+
One copy of any of the five books costs $8.
|
7
|
+
|
8
|
+
If, however, you buy two different books, you get a 5%
|
9
|
+
discount on those two books.
|
10
|
+
|
11
|
+
If you buy 3 different books, you get a 10% discount.
|
12
|
+
|
13
|
+
If you buy 4 different books, you get a 20% discount.
|
14
|
+
|
15
|
+
If you buy all 5, you get a 25% discount.
|
16
|
+
|
17
|
+
Note: that if you buy four books, of which 3 are
|
18
|
+
different titles, you get a 10% discount on the 3 that
|
19
|
+
form part of a set, but the fourth book still costs $8.
|
20
|
+
|
21
|
+
Your mission is to write a piece of code to calculate the
|
22
|
+
price of any conceivable shopping basket (containing only
|
23
|
+
books of the same series), giving as big a discount as
|
24
|
+
possible.
|
25
|
+
|
26
|
+
For example, how much does this basket of books cost?
|
27
|
+
|
28
|
+
- 2 copies of the first book
|
29
|
+
- 2 copies of the second book
|
30
|
+
- 2 copies of the third book
|
31
|
+
- 1 copy of the fourth book
|
32
|
+
- 1 copy of the fifth book
|
33
|
+
|
34
|
+
One way of grouping these 8 books is:
|
35
|
+
|
36
|
+
- 1 group of 5 --> 25% discount (1st,2nd,3rd,4th,5th)
|
37
|
+
- +1 group of 3 --> 10% discount (1st,2nd,3rd)
|
38
|
+
|
39
|
+
This would give a total of:
|
40
|
+
|
41
|
+
- 5 books at a 25% discount
|
42
|
+
- +3 books at a 10% discount
|
43
|
+
|
44
|
+
Resulting in:
|
45
|
+
|
46
|
+
- 5 x (8 - 2.00) == 5 x 6.00 == $30.00
|
47
|
+
- +3 x (8 - 0.80) == 3 x 7.20 == $21.60
|
48
|
+
|
49
|
+
For a total of $51.60
|
50
|
+
|
51
|
+
However, a different way to group these 8 books is:
|
52
|
+
|
53
|
+
- 1 group of 4 books --> 20% discount (1st,2nd,3rd,4th)
|
54
|
+
- +1 group of 4 books --> 20% discount (1st,2nd,3rd,5th)
|
55
|
+
|
56
|
+
This would give a total of:
|
57
|
+
|
58
|
+
- 4 books at a 20% discount
|
59
|
+
- +4 books at a 20% discount
|
60
|
+
|
61
|
+
Resulting in:
|
62
|
+
|
63
|
+
- 4 x (8 - 1.60) == 4 x 6.40 == $25.60
|
64
|
+
- +4 x (8 - 1.60) == 4 x 6.40 == $25.60
|
65
|
+
|
66
|
+
For a total of $51.20
|
67
|
+
|
68
|
+
And $51.20 is the price with the biggest discount.
|
69
|
+
## Source
|
70
|
+
|
71
|
+
Inspired by the harry potter kata from Cyber-Dojo. [http://cyber-dojo.org](http://cyber-dojo.org)
|
72
|
+
|
73
|
+
## Submitting Incomplete Solutions
|
74
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Bowling
|
2
|
+
|
3
|
+
Score a bowling game.
|
4
|
+
|
5
|
+
Bowling is game where players roll a heavy ball to knock down pins
|
6
|
+
arranged in a triangle. Write code to keep track of the score
|
7
|
+
of a game of bowling.
|
8
|
+
|
9
|
+
## Scoring Bowling
|
10
|
+
|
11
|
+
The game consists of 10 frames. A frame is composed of one or two ball throws with 10 pins standing at frame initialization. There are three cases for the tabulation of a frame.
|
12
|
+
|
13
|
+
* An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down.
|
14
|
+
|
15
|
+
* A spare is where all ten pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in their next throw.
|
16
|
+
|
17
|
+
* A strike is where all ten pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in their next two throws. If a strike is immediately followed by a second strike, then we can not total the value of first strike until they throw the ball one more time.
|
18
|
+
|
19
|
+
Here is a three frame example:
|
20
|
+
|
21
|
+
| Frame 1 | Frame 2 | Frame 3 |
|
22
|
+
| :-------------: |:-------------:| :---------------------:|
|
23
|
+
| X (strike) | 5/ (spare) | 9 0 (open frame) |
|
24
|
+
|
25
|
+
Frame 1 is (10 + 5 + 5) = 20
|
26
|
+
|
27
|
+
Frame 2 is (5 + 5 + 9) = 19
|
28
|
+
|
29
|
+
Frame 3 is (9 + 0) = 9
|
30
|
+
|
31
|
+
This means the current running total is 48.
|
32
|
+
|
33
|
+
The tenth frame in the game is a special case. If someone throws a strike or a spare then they get a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down.
|
34
|
+
|
35
|
+
For a tenth frame of X1/ (strike and a spare), the total value is 20.
|
36
|
+
|
37
|
+
For a tenth frame of XXX (three strikes), the total value is 30.
|
38
|
+
|
39
|
+
## Requirements
|
40
|
+
|
41
|
+
Write code to keep track of the score of a game of bowling. It should
|
42
|
+
support two operations:
|
43
|
+
|
44
|
+
* `roll(pins : int)` is called each time the player rolls a ball. The
|
45
|
+
argument is the number of pins knocked down.
|
46
|
+
* `score() : int` is called only at the very end of the game. It
|
47
|
+
returns the total score for that game.
|
48
|
+
## Source
|
49
|
+
|
50
|
+
The Bowling Game Kata at but UncleBob [http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata](http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata)
|
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,10 @@
|
|
1
|
+
# Bracket Push
|
2
|
+
|
3
|
+
Given a string containing brackets `[]`, braces `{}` and parentheses `()`,
|
4
|
+
verify that all the pairs are matched and nested correctly.
|
5
|
+
## Source
|
6
|
+
|
7
|
+
Ginna Baker
|
8
|
+
|
9
|
+
## Submitting Incomplete Solutions
|
10
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Change
|
2
|
+
|
3
|
+
Correctly determine the fewest number of coins to be given to a customer such
|
4
|
+
that the sum of the coins' value would equal the correct amount of change.
|
5
|
+
|
6
|
+
## For example
|
7
|
+
|
8
|
+
- An input of 15 with [1, 5, 10, 25, 100] should return one nickel (5)
|
9
|
+
and one dime (10) or [0, 1, 1, 0, 0]
|
10
|
+
- An input of 40 with [1, 5, 10, 25, 100] should return one nickel (5)
|
11
|
+
and one dime (10) and one quarter (25) or [0, 1, 1, 1, 0]
|
12
|
+
|
13
|
+
## Edge cases
|
14
|
+
|
15
|
+
- Does your algorithm work for any given set of coins?
|
16
|
+
- Can you ask for negative change?
|
17
|
+
- Can you ask for a change value smaller than the smallest coin value?
|
18
|
+
## Source
|
19
|
+
|
20
|
+
Software Craftsmanship - Kata-logue [http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata](http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata)
|
21
|
+
|
22
|
+
## Submitting Incomplete Solutions
|
23
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# Circular Buffer
|
2
|
+
|
3
|
+
A circular buffer, cyclic buffer or ring buffer is a data structure that
|
4
|
+
uses a single, fixed-size buffer as if it were connected end-to-end.
|
5
|
+
|
6
|
+
A circular buffer first starts empty and of some predefined length. For
|
7
|
+
example, this is a 7-element buffer:
|
8
|
+
|
9
|
+
[ ][ ][ ][ ][ ][ ][ ]
|
10
|
+
|
11
|
+
Assume that a 1 is written into the middle of the buffer (exact starting
|
12
|
+
location does not matter in a circular buffer):
|
13
|
+
|
14
|
+
[ ][ ][ ][1][ ][ ][ ]
|
15
|
+
|
16
|
+
Then assume that two more elements are added — 2 & 3 — which get
|
17
|
+
appended after the 1:
|
18
|
+
|
19
|
+
[ ][ ][ ][1][2][3][ ]
|
20
|
+
|
21
|
+
If two elements are then removed from the buffer, the oldest values
|
22
|
+
inside the buffer are removed. The two elements removed, in this case,
|
23
|
+
are 1 & 2, leaving the buffer with just a 3:
|
24
|
+
|
25
|
+
[ ][ ][ ][ ][ ][3][ ]
|
26
|
+
|
27
|
+
If the buffer has 7 elements then it is completely full:
|
28
|
+
|
29
|
+
[6][7][8][9][3][4][5]
|
30
|
+
|
31
|
+
When the buffer is full an error will be raised, alerting the client
|
32
|
+
that further writes are blocked until a slot becomes free.
|
33
|
+
|
34
|
+
The client can opt to overwrite the oldest data with a forced write. In
|
35
|
+
this case, two more elements — A & B — are added and they overwrite the
|
36
|
+
3 & 4:
|
37
|
+
|
38
|
+
[6][7][8][9][A][B][5]
|
39
|
+
|
40
|
+
Finally, if two elements are now removed then what would be returned is
|
41
|
+
not 3 & 4 but 5 & 6 because A & B overwrote the 3 & the 4 yielding the
|
42
|
+
buffer with:
|
43
|
+
|
44
|
+
[ ][7][8][9][A][B][ ]
|
45
|
+
## Source
|
46
|
+
|
47
|
+
Wikipedia [http://en.wikipedia.org/wiki/Circular_buffer](http://en.wikipedia.org/wiki/Circular_buffer)
|
48
|
+
|
49
|
+
## Submitting Incomplete Solutions
|
50
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Clock
|
2
|
+
|
3
|
+
Implement a clock that handles times without dates.
|
4
|
+
|
5
|
+
You should be able to add and subtract minutes to it.
|
6
|
+
|
7
|
+
Two clocks that represent the same time should be equal to each other.
|
8
|
+
## Source
|
9
|
+
|
10
|
+
Pairing session with Erin Drummond [https://twitter.com/ebdrummond](https://twitter.com/ebdrummond)
|
11
|
+
|
12
|
+
## Submitting Incomplete Solutions
|
13
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Connect
|
2
|
+
|
3
|
+
Compute the result for a game of Hex / Polygon.
|
4
|
+
|
5
|
+
The abstract boardgame known as
|
6
|
+
[Hex](https://en.wikipedia.org/wiki/Hex_%28board_game%29) / Polygon /
|
7
|
+
CON-TAC-TIX is quite simple in rules, though complex in practice. Two players
|
8
|
+
place stones on a rhombus with hexagonal fields. The player to connect his/her
|
9
|
+
stones to the opposite side first wins. The four sides of the rhombus are
|
10
|
+
divided between the two players (i.e. one player gets assigned a side and the
|
11
|
+
side directly opposite it and the other player gets assigned the two other
|
12
|
+
sides).
|
13
|
+
|
14
|
+
Your goal is to build a program that given a simple representation of a board
|
15
|
+
computes the winner (or lack thereof). Note that all games need not be "fair".
|
16
|
+
(For example, players may have mismatched piece counts.)
|
17
|
+
|
18
|
+
The boards look like this (with spaces added for readability, which won't be in
|
19
|
+
the representation passed to your code):
|
20
|
+
|
21
|
+
```
|
22
|
+
. O . X .
|
23
|
+
. X X O .
|
24
|
+
O O O X .
|
25
|
+
. X O X O
|
26
|
+
X O O O X
|
27
|
+
```
|
28
|
+
|
29
|
+
"Player `O`" plays from top to bottom, "Player `X`" plays from left to right. In
|
30
|
+
the above example `O` has made a connection from left to right but nobody has
|
31
|
+
won since `O` didn't connect top and bottom.
|
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,74 @@
|
|
1
|
+
# Crypto Square
|
2
|
+
|
3
|
+
Implement the classic method for composing secret messages called a square code.
|
4
|
+
|
5
|
+
Given an English text, output the encoded version of that text.
|
6
|
+
|
7
|
+
First, the input is normalized: the spaces and punctuation are removed
|
8
|
+
from the English text and the message is downcased.
|
9
|
+
|
10
|
+
Then, the normalized characters are broken into rows. These rows can be
|
11
|
+
regarded as forming a rectangle when printed with intervening newlines.
|
12
|
+
|
13
|
+
For example, the sentence
|
14
|
+
|
15
|
+
> If man was meant to stay on the ground, god would have given us roots.
|
16
|
+
|
17
|
+
is normalized to:
|
18
|
+
|
19
|
+
> ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots
|
20
|
+
|
21
|
+
The plaintext should be organized in to a rectangle. The size of the
|
22
|
+
rectangle (`r x c`) should be decided by the length of the message,
|
23
|
+
such that `c >= r` and `c - r <= 1`, where `c` is the number of columns
|
24
|
+
and `r` is the number of rows.
|
25
|
+
|
26
|
+
Our normalized text is 54 characters long, dictating a rectangle with
|
27
|
+
`c = 8` and `r = 7`:
|
28
|
+
|
29
|
+
```plain
|
30
|
+
ifmanwas
|
31
|
+
meanttos
|
32
|
+
tayonthe
|
33
|
+
groundgo
|
34
|
+
dwouldha
|
35
|
+
vegivenu
|
36
|
+
sroots
|
37
|
+
```
|
38
|
+
|
39
|
+
The coded message is obtained by reading down the columns going left to
|
40
|
+
right.
|
41
|
+
|
42
|
+
The message above is coded as:
|
43
|
+
|
44
|
+
```plain
|
45
|
+
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
|
46
|
+
```
|
47
|
+
|
48
|
+
Output the encoded text in chunks. Phrases that fill perfect squares
|
49
|
+
`(r X r)` should be output in `r`-length chunks separated by spaces.
|
50
|
+
Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.
|
51
|
+
|
52
|
+
```plain
|
53
|
+
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
|
54
|
+
```
|
55
|
+
|
56
|
+
Notice that were we to stack these, we could visually decode the
|
57
|
+
cyphertext back in to the original message:
|
58
|
+
|
59
|
+
```plain
|
60
|
+
imtgdvs
|
61
|
+
fearwer
|
62
|
+
mayoogo
|
63
|
+
anouuio
|
64
|
+
ntnnlvt
|
65
|
+
wttddes
|
66
|
+
aohghn
|
67
|
+
sseoau
|
68
|
+
```
|
69
|
+
## Source
|
70
|
+
|
71
|
+
J Dalbey's Programming Practice problems [http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html](http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html)
|
72
|
+
|
73
|
+
## Submitting Incomplete Solutions
|
74
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|