trackler 2.2.0.1 → 2.2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fixtures/tracks/fake/config.json +4 -3
- data/fixtures/tracks/fruit/config.json +4 -3
- data/lib/trackler/track.rb +2 -2
- data/lib/trackler/version.rb +1 -1
- data/tracks/{java/exercises/allergies/.meta/readme.go.tmpl → c/config/exercise_readme.go.tmpl} +0 -1
- data/tracks/c/exercises/acronym/README.md +47 -0
- data/tracks/c/exercises/all-your-base/README.md +67 -0
- data/tracks/c/exercises/allergies/README.md +69 -0
- data/tracks/c/exercises/anagram/README.md +45 -0
- data/tracks/c/exercises/atbash-cipher/README.md +66 -0
- data/tracks/c/exercises/beer-song/README.md +359 -0
- data/tracks/c/exercises/binary/README.md +67 -0
- data/tracks/c/exercises/binary-search/README.md +73 -0
- data/tracks/c/exercises/bob/README.md +50 -0
- data/tracks/c/exercises/clock/README.md +45 -0
- data/tracks/c/exercises/difference-of-squares/README.md +51 -0
- data/tracks/c/exercises/gigasecond/README.md +43 -0
- data/tracks/c/exercises/grains/README.md +66 -0
- data/tracks/c/exercises/hamming/README.md +74 -0
- data/tracks/c/exercises/hello-world/README.md +53 -0
- data/tracks/c/exercises/isogram/README.md +51 -0
- data/tracks/c/exercises/largest-series-product/README.md +52 -0
- data/tracks/c/exercises/leap/README.md +65 -0
- data/tracks/c/exercises/meetup/README.md +62 -0
- data/tracks/c/exercises/nth-prime/README.md +47 -0
- data/tracks/c/exercises/nucleotide-count/README.md +65 -0
- data/tracks/c/exercises/palindrome-products/README.md +72 -0
- data/tracks/c/exercises/pangram/README.md +47 -0
- data/tracks/c/exercises/pascals-triangle/README.md +53 -0
- data/tracks/c/exercises/perfect-numbers/README.md +56 -0
- data/tracks/c/exercises/phone-number/README.md +66 -0
- data/tracks/c/exercises/raindrops/README.md +56 -0
- data/tracks/c/exercises/react/README.md +51 -0
- data/tracks/c/exercises/rna-transcription/README.md +57 -0
- data/tracks/c/exercises/robot-simulator/README.md +66 -0
- data/tracks/c/exercises/roman-numerals/README.md +81 -0
- data/tracks/c/exercises/scrabble-score/README.md +76 -0
- data/tracks/c/exercises/series/README.md +59 -0
- data/tracks/c/exercises/sieve/README.md +66 -0
- data/tracks/c/exercises/space-age/README.md +56 -0
- data/tracks/c/exercises/sum-of-multiples/README.md +50 -0
- data/tracks/c/exercises/triangle/README.md +58 -0
- data/tracks/c/exercises/word-count/README.md +51 -0
- data/tracks/ceylon/README.md +3 -3
- data/tracks/ceylon/config/exercise-readme-insert.md +1 -0
- data/tracks/{java/exercises/accumulate/.meta/readme.go.tmpl → ceylon/config/exercise_readme.go.tmpl} +0 -1
- data/tracks/ceylon/exercises/anagram/README.md +29 -0
- data/tracks/ceylon/{docs/EXERCISE_README_INSERT.md → exercises/bracket-push/README.md} +12 -0
- data/tracks/ceylon/exercises/hamming/README.md +58 -0
- data/tracks/ceylon/exercises/largest-series-product/README.md +36 -0
- data/tracks/ceylon/exercises/leap/README.md +49 -0
- data/tracks/ceylon/exercises/react/README.md +35 -0
- data/tracks/ceylon/exercises/sieve/README.md +50 -0
- data/tracks/{java/exercises/acronym/.meta/readme.go.tmpl → delphi/config/exercise_readme.go.tmpl} +0 -1
- data/tracks/delphi/exercises/allergies/README.md +58 -0
- data/tracks/delphi/exercises/bank-account/README.md +51 -0
- data/tracks/delphi/exercises/beer-song/README.md +348 -0
- data/tracks/delphi/exercises/binary-search/README.md +62 -0
- data/tracks/delphi/exercises/bob/README.md +39 -0
- data/tracks/delphi/exercises/book-store/README.md +95 -0
- data/tracks/delphi/exercises/bowling/README.md +74 -0
- data/tracks/delphi/exercises/circular-buffer/README.md +71 -0
- data/tracks/delphi/exercises/clock/README.md +34 -0
- data/tracks/delphi/exercises/collatz-conjecture/README.md +54 -0
- data/tracks/delphi/exercises/etl/README.md +72 -0
- data/tracks/delphi/exercises/grains/README.md +55 -0
- data/tracks/delphi/exercises/hamming/README.md +63 -0
- data/tracks/delphi/exercises/hello-world/README.md +42 -0
- data/tracks/delphi/exercises/leap/README.md +54 -0
- data/tracks/delphi/exercises/minesweeper/README.md +51 -0
- data/tracks/delphi/exercises/nucleotide-count/README.md +54 -0
- data/tracks/delphi/exercises/perfect-numbers/README.md +45 -0
- data/tracks/delphi/exercises/phone-number/README.md +55 -0
- data/tracks/delphi/exercises/poker/README.md +33 -0
- data/tracks/delphi/exercises/raindrops/README.md +45 -0
- data/tracks/delphi/exercises/rna-transcription/README.md +46 -0
- data/tracks/delphi/exercises/roman-numerals/README.md +70 -0
- data/tracks/delphi/exercises/saddle-points/README.md +54 -0
- data/tracks/delphi/exercises/triangle/README.md +47 -0
- data/tracks/delphi/exercises/two-fer/README.md +69 -0
- data/tracks/delphi/exercises/wordy/README.md +84 -0
- data/tracks/{java/exercises/all-your-base/.meta/readme.go.tmpl → factor/config/exercise_readme.go.tmpl} +0 -1
- data/tracks/factor/exercises/hello-world/README.md +34 -0
- data/tracks/factor/exercises/isogram/README.md +32 -0
- data/tracks/factor/exercises/leap/README.md +46 -0
- data/tracks/factor/exercises/two-fer/README.md +61 -0
- data/tracks/haskell/config/exercise_readme.go.tmpl +16 -0
- data/tracks/haskell/exercises/accumulate/README.md +89 -0
- data/tracks/haskell/exercises/acronym/README.md +69 -0
- data/tracks/haskell/exercises/all-your-base/README.md +89 -0
- data/tracks/haskell/exercises/allergies/README.md +104 -0
- data/tracks/haskell/exercises/alphametics/README.md +96 -0
- data/tracks/haskell/exercises/anagram/README.md +91 -0
- data/tracks/haskell/exercises/atbash-cipher/README.md +88 -0
- data/tracks/haskell/exercises/bank-account/README.md +102 -0
- data/tracks/haskell/exercises/beer-song/README.md +401 -0
- data/tracks/haskell/exercises/binary/README.md +89 -0
- data/tracks/haskell/exercises/binary-search-tree/README.md +133 -0
- data/tracks/haskell/exercises/bob/README.md +72 -0
- data/tracks/haskell/exercises/bowling/README.md +128 -0
- data/tracks/haskell/exercises/bracket-push/README.md +64 -0
- data/tracks/haskell/exercises/change/README.md +77 -0
- data/tracks/haskell/exercises/clock/README.md +86 -0
- data/tracks/haskell/exercises/connect/README.md +88 -0
- data/tracks/haskell/exercises/crypto-square/README.md +128 -0
- data/tracks/haskell/exercises/custom-set/README.md +94 -0
- data/tracks/haskell/exercises/difference-of-squares/README.md +73 -0
- data/tracks/haskell/exercises/dominoes/README.md +72 -0
- data/tracks/haskell/exercises/etl/README.md +105 -0
- data/tracks/haskell/exercises/food-chain/README.md +145 -0
- data/tracks/haskell/exercises/forth/README.md +98 -0
- data/tracks/haskell/exercises/gigasecond/README.md +65 -0
- data/tracks/haskell/exercises/go-counting/README.md +109 -0
- data/tracks/haskell/exercises/grade-school/README.md +111 -0
- data/tracks/haskell/exercises/grains/README.md +88 -0
- data/tracks/haskell/exercises/hamming/README.md +96 -0
- data/tracks/haskell/exercises/hello-world/README.md +83 -0
- data/tracks/haskell/exercises/hexadecimal/README.md +68 -0
- data/tracks/haskell/exercises/house/README.md +187 -0
- data/tracks/haskell/exercises/kindergarten-garden/README.md +120 -0
- data/tracks/haskell/exercises/largest-series-product/README.md +74 -0
- data/tracks/haskell/exercises/leap/README.md +100 -0
- data/tracks/haskell/exercises/lens-person/README.md +66 -0
- data/tracks/haskell/exercises/linked-list/README.md +104 -0
- data/tracks/haskell/exercises/list-ops/README.md +64 -0
- data/tracks/haskell/exercises/luhn/README.md +125 -0
- data/tracks/haskell/exercises/matrix/README.md +125 -0
- data/tracks/haskell/exercises/meetup/README.md +92 -0
- data/tracks/haskell/exercises/minesweeper/README.md +84 -0
- data/tracks/haskell/exercises/nth-prime/README.md +69 -0
- data/tracks/haskell/exercises/nucleotide-count/README.md +87 -0
- data/tracks/haskell/exercises/ocr-numbers/README.md +139 -0
- data/tracks/haskell/exercises/octal/README.md +115 -0
- data/tracks/haskell/exercises/palindrome-products/README.md +115 -0
- data/tracks/haskell/exercises/pangram/README.md +69 -0
- data/tracks/haskell/exercises/parallel-letter-frequency/README.md +76 -0
- data/tracks/haskell/exercises/pascals-triangle/README.md +75 -0
- data/tracks/haskell/exercises/phone-number/README.md +88 -0
- data/tracks/haskell/exercises/pig-latin/README.md +78 -0
- data/tracks/haskell/exercises/pov/README.md +100 -0
- data/tracks/haskell/exercises/prime-factors/README.md +90 -0
- data/tracks/haskell/exercises/pythagorean-triplet/README.md +78 -0
- data/tracks/haskell/exercises/queen-attack/README.md +105 -0
- data/tracks/haskell/exercises/raindrops/README.md +78 -0
- data/tracks/haskell/exercises/rna-transcription/README.md +79 -0
- data/tracks/haskell/exercises/robot-name/README.md +90 -0
- data/tracks/haskell/exercises/robot-simulator/README.md +105 -0
- data/tracks/haskell/exercises/roman-numerals/README.md +112 -0
- data/tracks/haskell/exercises/run-length-encoding/README.md +84 -0
- data/tracks/haskell/exercises/saddle-points/README.md +87 -0
- data/tracks/haskell/exercises/say/README.md +123 -0
- data/tracks/haskell/exercises/scrabble-score/README.md +98 -0
- data/tracks/haskell/exercises/secret-handshake/README.md +89 -0
- data/tracks/haskell/exercises/series/README.md +106 -0
- data/tracks/haskell/exercises/sgf-parsing/README.md +146 -0
- data/tracks/haskell/exercises/sieve/README.md +88 -0
- data/tracks/haskell/exercises/simple-cipher/README.md +144 -0
- data/tracks/haskell/exercises/simple-linked-list/README.md +101 -0
- data/tracks/haskell/exercises/space-age/README.md +94 -0
- data/tracks/haskell/exercises/spiral-matrix/README.md +84 -0
- data/tracks/haskell/exercises/strain/README.md +94 -0
- data/tracks/haskell/exercises/sublist/README.md +80 -0
- data/tracks/haskell/exercises/sum-of-multiples/README.md +72 -0
- data/tracks/haskell/exercises/triangle/README.md +80 -0
- data/tracks/haskell/exercises/trinary/README.md +96 -0
- data/tracks/haskell/exercises/word-count/README.md +96 -0
- data/tracks/haskell/exercises/wordy/README.md +122 -0
- data/tracks/haskell/exercises/zebra-puzzle/README.md +86 -0
- data/tracks/haskell/exercises/zipper/README.md +85 -0
- data/tracks/java/config/exercise_readme.go.tmpl +16 -0
- data/tracks/java/exercises/accumulate/README.md +0 -1
- data/tracks/java/exercises/acronym/README.md +0 -1
- data/tracks/java/exercises/all-your-base/README.md +0 -1
- data/tracks/java/exercises/allergies/README.md +0 -1
- data/tracks/java/exercises/anagram/README.md +0 -1
- data/tracks/java/exercises/atbash-cipher/README.md +0 -1
- data/tracks/java/exercises/bank-account/README.md +0 -1
- data/tracks/java/exercises/beer-song/README.md +0 -1
- data/tracks/java/exercises/binary/README.md +0 -1
- data/tracks/java/exercises/binary-search/README.md +0 -1
- data/tracks/java/exercises/binary-search-tree/README.md +0 -1
- data/tracks/java/exercises/bob/README.md +0 -1
- data/tracks/java/exercises/book-store/README.md +0 -1
- data/tracks/java/exercises/bowling/README.md +0 -1
- data/tracks/java/exercises/bracket-push/README.md +0 -1
- data/tracks/java/exercises/change/README.md +0 -1
- data/tracks/java/exercises/circular-buffer/README.md +0 -1
- data/tracks/java/exercises/clock/README.md +0 -1
- data/tracks/java/exercises/collatz-conjecture/README.md +0 -1
- data/tracks/java/exercises/complex-numbers/README.md +0 -1
- data/tracks/java/exercises/crypto-square/README.md +0 -1
- data/tracks/java/exercises/custom-set/README.md +0 -1
- data/tracks/java/exercises/diamond/README.md +0 -1
- data/tracks/java/exercises/difference-of-squares/README.md +0 -1
- data/tracks/java/exercises/etl/README.md +0 -1
- data/tracks/java/exercises/flatten-array/README.md +0 -1
- data/tracks/java/exercises/food-chain/README.md +0 -1
- data/tracks/java/exercises/gigasecond/README.md +0 -1
- data/tracks/java/exercises/grade-school/README.md +0 -1
- data/tracks/java/exercises/hamming/README.md +0 -1
- data/tracks/java/exercises/hello-world/README.md +0 -1
- data/tracks/java/exercises/hexadecimal/README.md +0 -1
- data/tracks/java/exercises/isogram/README.md +0 -1
- data/tracks/java/exercises/kindergarten-garden/README.md +0 -1
- data/tracks/java/exercises/largest-series-product/README.md +0 -1
- data/tracks/java/exercises/linked-list/README.md +0 -1
- data/tracks/java/exercises/list-ops/README.md +0 -1
- data/tracks/java/exercises/luhn/README.md +0 -1
- data/tracks/java/exercises/matrix/README.md +0 -1
- data/tracks/java/exercises/meetup/README.md +0 -1
- data/tracks/java/exercises/minesweeper/README.md +0 -1
- data/tracks/java/exercises/nth-prime/README.md +0 -1
- data/tracks/java/exercises/nucleotide-count/README.md +0 -1
- data/tracks/java/exercises/ocr-numbers/README.md +0 -1
- data/tracks/java/exercises/octal/README.md +0 -1
- data/tracks/java/exercises/palindrome-products/README.md +0 -1
- data/tracks/java/exercises/pangram/README.md +0 -1
- data/tracks/java/exercises/pascals-triangle/README.md +0 -1
- data/tracks/java/exercises/perfect-numbers/README.md +0 -1
- data/tracks/java/exercises/phone-number/README.md +0 -1
- data/tracks/java/exercises/pig-latin/README.md +0 -1
- data/tracks/java/exercises/poker/README.md +0 -1
- data/tracks/java/exercises/prime-factors/README.md +0 -1
- data/tracks/java/exercises/pythagorean-triplet/README.md +0 -1
- data/tracks/java/exercises/queen-attack/README.md +0 -1
- data/tracks/java/exercises/raindrops/README.md +0 -1
- data/tracks/java/exercises/rectangles/README.md +0 -1
- data/tracks/java/exercises/rna-transcription/README.md +0 -1
- data/tracks/java/exercises/robot-name/README.md +0 -1
- data/tracks/java/exercises/robot-simulator/README.md +0 -1
- data/tracks/java/exercises/roman-numerals/README.md +0 -1
- data/tracks/java/exercises/rotational-cipher/README.md +47 -0
- data/tracks/java/exercises/run-length-encoding/README.md +0 -1
- data/tracks/java/exercises/saddle-points/README.md +0 -1
- data/tracks/java/exercises/scrabble-score/README.md +0 -1
- data/tracks/java/exercises/secret-handshake/README.md +0 -1
- data/tracks/java/exercises/series/README.md +0 -1
- data/tracks/java/exercises/sieve/README.md +0 -1
- data/tracks/java/exercises/simple-cipher/README.md +0 -1
- data/tracks/java/exercises/simple-linked-list/README.md +0 -1
- data/tracks/java/exercises/space-age/README.md +0 -1
- data/tracks/java/exercises/spiral-matrix/README.md +0 -1
- data/tracks/java/exercises/strain/README.md +0 -1
- data/tracks/java/exercises/sublist/README.md +0 -1
- data/tracks/java/exercises/sum-of-multiples/README.md +0 -1
- data/tracks/java/exercises/transpose/README.md +0 -1
- data/tracks/java/exercises/triangle/README.md +0 -1
- data/tracks/java/exercises/trinary/README.md +0 -1
- data/tracks/java/exercises/twelve-days/README.md +0 -1
- data/tracks/java/exercises/two-fer/README.md +0 -1
- data/tracks/java/exercises/word-count/README.md +0 -1
- data/tracks/java/exercises/word-search/README.md +0 -1
- data/tracks/java/exercises/wordy/README.md +0 -1
- data/tracks/javascript/config/exercise_readme.go.tmpl +16 -0
- data/tracks/javascript/exercises/accumulate/README.md +59 -0
- data/tracks/javascript/exercises/acronym/README.md +39 -0
- data/tracks/javascript/exercises/all-your-base/README.md +59 -0
- data/tracks/javascript/exercises/allergies/README.md +61 -0
- data/tracks/javascript/exercises/alphametics/README.md +59 -0
- data/tracks/javascript/exercises/anagram/README.md +37 -0
- data/tracks/javascript/exercises/atbash-cipher/README.md +58 -0
- data/tracks/javascript/exercises/beer-song/README.md +351 -0
- data/tracks/javascript/exercises/binary/README.md +59 -0
- data/tracks/javascript/exercises/binary-search/README.md +65 -0
- data/tracks/javascript/exercises/binary-search-tree/README.md +84 -0
- data/tracks/javascript/exercises/bob/README.md +42 -0
- data/tracks/javascript/exercises/bowling/README.md +77 -0
- data/tracks/javascript/exercises/bracket-push/README.md +34 -0
- data/tracks/javascript/exercises/circular-buffer/README.md +74 -0
- data/tracks/javascript/exercises/clock/README.md +37 -0
- data/tracks/javascript/exercises/crypto-square/README.md +98 -0
- data/tracks/javascript/exercises/custom-set/README.md +35 -0
- data/tracks/javascript/exercises/diamond/README.md +83 -0
- data/tracks/javascript/exercises/difference-of-squares/README.md +43 -0
- data/tracks/javascript/exercises/etl/README.md +75 -0
- data/tracks/javascript/exercises/flatten-array/README.md +42 -0
- data/tracks/javascript/exercises/food-chain/README.md +94 -0
- data/tracks/javascript/exercises/gigasecond/README.md +35 -0
- data/tracks/javascript/exercises/grade-school/README.md +66 -0
- data/tracks/javascript/exercises/grains/README.md +58 -0
- data/tracks/javascript/exercises/hamming/README.md +66 -0
- data/tracks/javascript/exercises/hello-world/README.md +132 -0
- data/tracks/javascript/exercises/hexadecimal/README.md +38 -0
- data/tracks/javascript/exercises/isogram/README.md +43 -0
- data/tracks/javascript/exercises/kindergarten-garden/README.md +90 -0
- data/tracks/javascript/exercises/largest-series-product/README.md +44 -0
- data/tracks/javascript/exercises/leap/README.md +57 -0
- data/tracks/javascript/exercises/linked-list/README.md +58 -0
- data/tracks/javascript/exercises/list-ops/README.md +34 -0
- data/tracks/javascript/exercises/luhn/README.md +95 -0
- data/tracks/javascript/exercises/matrix/README.md +69 -0
- data/tracks/javascript/exercises/meetup/README.md +54 -0
- data/tracks/javascript/exercises/minesweeper/README.md +54 -0
- data/tracks/javascript/exercises/nth-prime/README.md +39 -0
- data/tracks/javascript/exercises/nucleotide-count/README.md +57 -0
- data/tracks/javascript/exercises/ocr-numbers/README.md +109 -0
- data/tracks/javascript/exercises/octal/README.md +73 -0
- data/tracks/javascript/exercises/palindrome-products/README.md +64 -0
- data/tracks/javascript/exercises/pangram/README.md +39 -0
- data/tracks/javascript/exercises/pascals-triangle/README.md +45 -0
- data/tracks/javascript/exercises/perfect-numbers/README.md +48 -0
- data/tracks/javascript/exercises/phone-number/README.md +58 -0
- data/tracks/javascript/exercises/pig-latin/README.md +48 -0
- data/tracks/javascript/exercises/point-mutations/README.md +65 -0
- data/tracks/javascript/exercises/prime-factors/README.md +60 -0
- data/tracks/javascript/exercises/proverb/README.md +42 -0
- data/tracks/javascript/exercises/pythagorean-triplet/README.md +48 -0
- data/tracks/javascript/exercises/queen-attack/README.md +57 -0
- data/tracks/javascript/exercises/raindrops/README.md +48 -0
- data/tracks/javascript/exercises/rna-transcription/README.md +49 -0
- data/tracks/javascript/exercises/robot-name/README.md +46 -0
- data/tracks/javascript/exercises/robot-simulator/README.md +58 -0
- data/tracks/javascript/exercises/roman-numerals/README.md +73 -0
- data/tracks/javascript/exercises/run-length-encoding/README.md +54 -0
- data/tracks/javascript/exercises/saddle-points/README.md +57 -0
- data/tracks/javascript/exercises/say/README.md +93 -0
- data/tracks/javascript/exercises/scrabble-score/README.md +68 -0
- data/tracks/javascript/exercises/secret-handshake/README.md +59 -0
- data/tracks/javascript/exercises/series/README.md +51 -0
- data/tracks/javascript/exercises/sieve/README.md +58 -0
- data/tracks/javascript/exercises/simple-cipher/README.md +114 -0
- data/tracks/javascript/exercises/simple-linked-list/README.md +52 -0
- data/tracks/javascript/exercises/space-age/README.md +48 -0
- data/tracks/javascript/exercises/strain/README.md +64 -0
- data/tracks/javascript/exercises/sum-of-multiples/README.md +42 -0
- data/tracks/javascript/exercises/triangle/README.md +50 -0
- data/tracks/javascript/exercises/trinary/README.md +52 -0
- data/tracks/javascript/exercises/two-bucket/README.md +60 -0
- data/tracks/javascript/exercises/word-count/README.md +43 -0
- data/tracks/javascript/exercises/wordy/README.md +87 -0
- data/tracks/lua/config/exercise_readme.go.tmpl +16 -0
- data/tracks/lua/exercises/acronym/README.md +25 -0
- data/tracks/lua/exercises/all-your-base/README.md +45 -0
- data/tracks/lua/exercises/allergies/README.md +47 -0
- data/tracks/lua/exercises/alphametics/README.md +45 -0
- data/tracks/lua/exercises/anagram/README.md +23 -0
- data/tracks/lua/exercises/atbash-cipher/README.md +44 -0
- data/tracks/lua/exercises/bank-account/README.md +40 -0
- data/tracks/lua/exercises/beer-song/README.md +337 -0
- data/tracks/lua/exercises/binary/README.md +45 -0
- data/tracks/lua/exercises/binary-search/README.md +51 -0
- data/tracks/lua/exercises/binary-search-tree/README.md +70 -0
- data/tracks/lua/exercises/bob/README.md +28 -0
- data/tracks/lua/exercises/bowling/README.md +63 -0
- data/tracks/lua/exercises/bracket-push/README.md +20 -0
- data/tracks/lua/exercises/change/README.md +33 -0
- data/tracks/lua/exercises/circular-buffer/README.md +60 -0
- data/tracks/lua/exercises/clock/README.md +23 -0
- data/tracks/lua/exercises/crypto-square/README.md +84 -0
- data/tracks/lua/exercises/custom-set/README.md +21 -0
- data/tracks/lua/exercises/diamond/README.md +69 -0
- data/tracks/lua/exercises/difference-of-squares/README.md +29 -0
- data/tracks/lua/exercises/etl/README.md +61 -0
- data/tracks/lua/exercises/flatten-array/README.md +28 -0
- data/tracks/lua/exercises/food-chain/README.md +80 -0
- data/tracks/lua/exercises/gigasecond/README.md +21 -0
- data/tracks/lua/exercises/grade-school/README.md +52 -0
- data/tracks/lua/exercises/grains/README.md +44 -0
- data/tracks/lua/exercises/hamming/README.md +52 -0
- data/tracks/lua/exercises/hello-world/README.md +31 -0
- data/tracks/lua/exercises/house/README.md +123 -0
- data/tracks/lua/exercises/isogram/README.md +29 -0
- data/tracks/lua/exercises/kindergarten-garden/README.md +76 -0
- data/tracks/lua/exercises/largest-series-product/README.md +30 -0
- data/tracks/lua/exercises/leap/README.md +43 -0
- data/tracks/lua/exercises/linked-list/README.md +44 -0
- data/tracks/lua/exercises/list-ops/README.md +20 -0
- data/tracks/lua/exercises/luhn/README.md +81 -0
- data/tracks/lua/exercises/matrix/README.md +55 -0
- data/tracks/lua/exercises/meetup/README.md +40 -0
- data/tracks/lua/exercises/minesweeper/README.md +40 -0
- data/tracks/lua/exercises/nth-prime/README.md +25 -0
- data/tracks/lua/exercises/nucleotide-count/README.md +43 -0
- data/tracks/lua/exercises/ocr-numbers/README.md +95 -0
- data/tracks/lua/exercises/octal/README.md +59 -0
- data/tracks/lua/exercises/pangram/README.md +25 -0
- data/tracks/lua/exercises/pascals-triangle/README.md +31 -0
- data/tracks/lua/exercises/perfect-numbers/README.md +34 -0
- data/tracks/lua/exercises/phone-number/README.md +44 -0
- data/tracks/lua/exercises/pig-latin/README.md +34 -0
- data/tracks/lua/exercises/pov/README.md +56 -0
- data/tracks/lua/exercises/prime-factors/README.md +46 -0
- data/tracks/lua/exercises/protein-translation/README.md +59 -0
- data/tracks/lua/exercises/pythagorean-triplet/README.md +34 -0
- data/tracks/lua/exercises/rail-fence-cipher/README.md +70 -0
- data/tracks/lua/exercises/raindrops/README.md +34 -0
- data/tracks/lua/exercises/rectangles/README.md +77 -0
- data/tracks/lua/exercises/rna-transcription/README.md +35 -0
- data/tracks/lua/exercises/robot-name/README.md +32 -0
- data/tracks/lua/exercises/robot-simulator/README.md +44 -0
- data/tracks/lua/exercises/roman-numerals/README.md +59 -0
- data/tracks/lua/exercises/run-length-encoding/README.md +40 -0
- data/tracks/lua/exercises/say/README.md +79 -0
- data/tracks/lua/exercises/scrabble-score/README.md +54 -0
- data/tracks/lua/exercises/secret-handshake/README.md +45 -0
- data/tracks/lua/exercises/series/README.md +37 -0
- data/tracks/lua/exercises/sieve/README.md +44 -0
- data/tracks/lua/exercises/space-age/README.md +34 -0
- data/tracks/lua/exercises/sublist/README.md +31 -0
- data/tracks/lua/exercises/sum-of-multiples/README.md +28 -0
- data/tracks/lua/exercises/tournament/README.md +78 -0
- data/tracks/lua/exercises/transpose/README.md +75 -0
- data/tracks/lua/exercises/triangle/README.md +36 -0
- data/tracks/lua/exercises/variable-length-quantity/README.md +49 -0
- data/tracks/lua/exercises/word-count/README.md +29 -0
- data/tracks/lua/exercises/word-search/README.md +40 -0
- data/tracks/mips/config/exercise_readme.go.tmpl +16 -0
- data/tracks/mips/exercises/atbash-cipher/README.md +34 -0
- data/tracks/mips/exercises/binary/README.md +35 -0
- data/tracks/mips/exercises/difference-of-squares/README.md +19 -0
- data/tracks/mips/exercises/hamming/README.md +42 -0
- data/tracks/mips/exercises/hexadecimal/README.md +14 -0
- data/tracks/mips/exercises/isogram/README.md +19 -0
- data/tracks/mips/exercises/leap/README.md +33 -0
- data/tracks/mips/exercises/nth-prime/README.md +15 -0
- data/tracks/mips/exercises/octal/README.md +49 -0
- data/tracks/mips/exercises/raindrops/README.md +24 -0
- data/tracks/mips/exercises/rna-transcription/README.md +25 -0
- data/tracks/mips/exercises/scrabble-score/README.md +44 -0
- data/tracks/mips/exercises/triangle/README.md +26 -0
- data/tracks/mips/exercises/trinary/README.md +28 -0
- data/tracks/purescript/config/exercise_readme.go.tmpl +16 -0
- data/tracks/purescript/exercises/accumulate/README.md +35 -0
- data/tracks/purescript/exercises/acronym/README.md +15 -0
- data/tracks/purescript/exercises/all-your-base/README.md +35 -0
- data/tracks/purescript/exercises/allergies/README.md +37 -0
- data/tracks/purescript/exercises/atbash-cipher/README.md +34 -0
- data/tracks/purescript/exercises/binary-search/README.md +41 -0
- data/tracks/purescript/exercises/bob/README.md +18 -0
- data/tracks/purescript/exercises/bracket-push/README.md +10 -0
- data/tracks/purescript/exercises/crypto-square/README.md +74 -0
- data/tracks/purescript/exercises/diamond/README.md +59 -0
- data/tracks/purescript/exercises/difference-of-squares/README.md +19 -0
- data/tracks/purescript/exercises/etl/README.md +51 -0
- data/tracks/purescript/exercises/hamming/README.md +42 -0
- data/tracks/purescript/exercises/hello-world/README.md +21 -0
- data/tracks/purescript/exercises/isogram/README.md +19 -0
- data/tracks/purescript/exercises/largest-series-product/README.md +20 -0
- data/tracks/purescript/exercises/leap/README.md +33 -0
- data/tracks/purescript/exercises/meetup/README.md +30 -0
- data/tracks/purescript/exercises/pangram/README.md +15 -0
- data/tracks/purescript/exercises/pascals-triangle/README.md +21 -0
- data/tracks/purescript/exercises/raindrops/README.md +24 -0
- data/tracks/purescript/exercises/scrabble-score/README.md +44 -0
- data/tracks/purescript/exercises/triangle/README.md +26 -0
- data/tracks/purescript/exercises/word-count/README.md +19 -0
- data/tracks/r/config/exercise_readme.go.tmpl +16 -0
- data/tracks/r/exercises/anagram/README.md +23 -0
- data/tracks/r/exercises/beer-song/README.md +337 -0
- data/tracks/r/exercises/bob/README.md +28 -0
- data/tracks/r/exercises/difference-of-squares/README.md +29 -0
- data/tracks/r/exercises/grains/README.md +44 -0
- data/tracks/r/exercises/hamming/README.md +52 -0
- data/tracks/r/exercises/hello-world/README.md +31 -0
- data/tracks/r/exercises/isogram/README.md +29 -0
- data/tracks/r/exercises/largest-series-product/README.md +30 -0
- data/tracks/r/exercises/leap/README.md +43 -0
- data/tracks/r/exercises/luhn/README.md +81 -0
- data/tracks/r/exercises/pascals-triangle/README.md +31 -0
- data/tracks/r/exercises/perfect-numbers/README.md +34 -0
- data/tracks/r/exercises/phone-number/README.md +44 -0
- data/tracks/r/exercises/prime-factors/README.md +46 -0
- data/tracks/r/exercises/raindrops/README.md +34 -0
- data/tracks/r/exercises/rna-transcription/README.md +35 -0
- data/tracks/r/exercises/rotational-cipher/README.md +46 -0
- data/tracks/r/exercises/scrabble-score/README.md +54 -0
- data/tracks/r/exercises/secret-handshake/README.md +45 -0
- data/tracks/r/exercises/sieve/README.md +44 -0
- data/tracks/r/exercises/space-age/README.md +34 -0
- data/tracks/r/exercises/sum-of-multiples/README.md +28 -0
- data/tracks/r/exercises/tournament/README.md +78 -0
- data/tracks/r/exercises/word-count/README.md +29 -0
- data/tracks/rust/{docs/EXERCISE_README_INSERT.md → config/exercise-readme-insert.md} +1 -1
- data/tracks/rust/config/exercise_readme.go.tmpl +16 -0
- data/tracks/rust/exercises/acronym/README.md +47 -0
- data/tracks/rust/exercises/all-your-base/README.md +67 -0
- data/tracks/rust/exercises/allergies/README.md +69 -0
- data/tracks/rust/exercises/alphametics/README.md +67 -0
- data/tracks/rust/exercises/anagram/README.md +45 -0
- data/tracks/rust/exercises/atbash-cipher/README.md +66 -0
- data/tracks/rust/exercises/beer-song/README.md +359 -0
- data/tracks/rust/exercises/bob/README.md +50 -0
- data/tracks/rust/exercises/bowling/README.md +85 -0
- data/tracks/rust/exercises/bracket-push/README.md +50 -0
- data/tracks/rust/exercises/circular-buffer/README.md +82 -0
- data/tracks/rust/exercises/custom-set/README.md +43 -0
- data/tracks/rust/exercises/difference-of-squares/README.md +51 -0
- data/tracks/rust/exercises/dominoes/README.md +50 -0
- data/tracks/rust/exercises/etl/README.md +83 -0
- data/tracks/rust/exercises/forth/README.md +61 -0
- data/tracks/rust/exercises/gigasecond/Cargo.lock +3 -3
- data/tracks/rust/exercises/gigasecond/Cargo.toml +1 -1
- data/tracks/rust/exercises/gigasecond/README.md +43 -0
- data/tracks/rust/exercises/gigasecond/example.rs +1 -1
- data/tracks/rust/exercises/gigasecond/src/lib.rs +2 -2
- data/tracks/rust/exercises/gigasecond/tests/gigasecond.rs +10 -10
- data/tracks/rust/exercises/grade-school/README.md +74 -0
- data/tracks/rust/exercises/grains/README.md +66 -0
- data/tracks/rust/exercises/hamming/README.md +74 -0
- data/tracks/rust/exercises/hello-world/README.md +53 -0
- data/tracks/rust/exercises/hexadecimal/README.md +46 -0
- data/tracks/rust/exercises/largest-series-product/README.md +60 -0
- data/tracks/rust/exercises/leap/README.md +65 -0
- data/tracks/rust/exercises/luhn/README.md +103 -0
- data/tracks/rust/exercises/luhn-from/README.md +49 -0
- data/tracks/rust/exercises/luhn-trait/README.md +57 -0
- data/tracks/rust/exercises/minesweeper/README.md +62 -0
- data/tracks/rust/exercises/nucleotide-codons/README.md +54 -0
- data/tracks/rust/exercises/nucleotide-count/README.md +65 -0
- data/tracks/rust/exercises/ocr-numbers/README.md +117 -0
- data/tracks/rust/exercises/pangram/README.md +47 -0
- data/tracks/rust/exercises/parallel-letter-frequency/README.md +77 -0
- data/tracks/rust/exercises/pascals-triangle/README.md +53 -0
- data/tracks/rust/exercises/phone-number/README.md +66 -0
- data/tracks/rust/exercises/protein-translation/README.md +81 -0
- data/tracks/rust/exercises/queen-attack/README.md +65 -0
- data/tracks/rust/exercises/raindrops/README.md +56 -0
- data/tracks/rust/exercises/react/README.md +51 -0
- data/tracks/rust/exercises/rectangles/README.md +99 -0
- data/tracks/rust/exercises/rna-transcription/README.md +57 -0
- data/tracks/rust/exercises/robot-name/README.md +54 -0
- data/tracks/rust/exercises/robot-simulator/README.md +66 -0
- data/tracks/rust/exercises/roman-numerals/README.md +81 -0
- data/tracks/rust/exercises/rotational-cipher/README.md +68 -0
- data/tracks/rust/exercises/run-length-encoding/README.md +62 -0
- data/tracks/rust/exercises/scrabble-score/README.md +76 -0
- data/tracks/rust/exercises/sieve/README.md +66 -0
- data/tracks/rust/exercises/space-age/README.md +64 -0
- data/tracks/rust/exercises/sublist/README.md +53 -0
- data/tracks/rust/exercises/sum-of-multiples/README.md +50 -0
- data/tracks/rust/exercises/tournament/README.md +100 -0
- data/tracks/rust/exercises/triangle/README.md +71 -0
- data/tracks/rust/exercises/variable-length-quantity/README.md +71 -0
- data/tracks/rust/exercises/word-count/README.md +51 -0
- data/tracks/rust/exercises/wordy/README.md +95 -0
- data/tracks/vimscript/config/exercise_readme.go.tmpl +16 -0
- data/tracks/vimscript/exercises/allergies/README.md +46 -0
- data/tracks/vimscript/exercises/anagram/README.md +22 -0
- data/tracks/vimscript/exercises/atbash-cipher/README.md +43 -0
- data/tracks/vimscript/exercises/beer-song/README.md +336 -0
- data/tracks/vimscript/exercises/bob/README.md +27 -0
- data/tracks/vimscript/exercises/difference-of-squares/README.md +28 -0
- data/tracks/vimscript/exercises/etl/README.md +60 -0
- data/tracks/vimscript/exercises/hamming/README.md +51 -0
- data/tracks/vimscript/exercises/hello-world/README.md +30 -0
- data/tracks/vimscript/exercises/largest-series-product/README.md +29 -0
- data/tracks/vimscript/exercises/leap/README.md +42 -0
- data/tracks/vimscript/exercises/nucleotide-count/README.md +42 -0
- data/tracks/vimscript/exercises/pangram/README.md +24 -0
- data/tracks/vimscript/exercises/phone-number/README.md +43 -0
- data/tracks/vimscript/exercises/raindrops/README.md +33 -0
- data/tracks/vimscript/exercises/rna-transcription/README.md +34 -0
- data/tracks/vimscript/exercises/roman-numerals/README.md +58 -0
- data/tracks/vimscript/exercises/scrabble-score/README.md +53 -0
- data/tracks/vimscript/exercises/triangle/README.md +35 -0
- data/tracks/vimscript/exercises/word-count/README.md +28 -0
- metadata +466 -86
- data/tracks/java/exercises/anagram/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/atbash-cipher/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/bank-account/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/beer-song/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/binary/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/binary-search/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/binary-search-tree/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/bob/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/book-store/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/bowling/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/bracket-push/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/change/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/circular-buffer/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/clock/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/collatz-conjecture/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/complex-numbers/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/crypto-square/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/custom-set/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/diamond/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/difference-of-squares/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/etl/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/flatten-array/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/food-chain/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/gigasecond/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/grade-school/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/hamming/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/hello-world/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/hexadecimal/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/isogram/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/kindergarten-garden/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/largest-series-product/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/linked-list/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/list-ops/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/luhn/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/matrix/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/meetup/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/minesweeper/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/nth-prime/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/nucleotide-count/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/ocr-numbers/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/octal/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/palindrome-products/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/pangram/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/pascals-triangle/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/perfect-numbers/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/phone-number/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/pig-latin/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/poker/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/prime-factors/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/pythagorean-triplet/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/queen-attack/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/raindrops/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/rectangles/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/rna-transcription/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/robot-name/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/robot-simulator/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/roman-numerals/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/run-length-encoding/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/saddle-points/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/scrabble-score/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/secret-handshake/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/series/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/sieve/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/simple-cipher/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/simple-linked-list/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/space-age/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/spiral-matrix/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/strain/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/sublist/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/sum-of-multiples/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/transpose/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/triangle/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/trinary/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/twelve-days/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/two-fer/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/word-count/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/word-search/.meta/readme.go.tmpl +0 -17
- data/tracks/java/exercises/wordy/.meta/readme.go.tmpl +0 -17
@@ -0,0 +1,133 @@
|
|
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
|
+
|
56
|
+
## Hints
|
57
|
+
|
58
|
+
To complete this exercise you need to create the data type `BST`,
|
59
|
+
with `Eq` and `Show` instances, and implement the functions:
|
60
|
+
|
61
|
+
- `bstLeft`
|
62
|
+
- `bstRight`
|
63
|
+
- `bstValue`
|
64
|
+
- `empty`
|
65
|
+
- `fromList`
|
66
|
+
- `insert`
|
67
|
+
- `singleton`
|
68
|
+
- `toList`
|
69
|
+
|
70
|
+
You will find a dummy data declaration and type signatures already in place,
|
71
|
+
but it is up to you to define the functions and create a meaningful data type,
|
72
|
+
newtype or type synonym.
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
## Getting Started
|
77
|
+
|
78
|
+
For installation and learning resources, refer to the
|
79
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
80
|
+
|
81
|
+
## Running the tests
|
82
|
+
|
83
|
+
To run the test suite, execute the following command:
|
84
|
+
|
85
|
+
```bash
|
86
|
+
stack test
|
87
|
+
```
|
88
|
+
|
89
|
+
#### If you get an error message like this...
|
90
|
+
|
91
|
+
```
|
92
|
+
No .cabal file found in directory
|
93
|
+
```
|
94
|
+
|
95
|
+
You are probably running an old stack version and need
|
96
|
+
to upgrade it.
|
97
|
+
|
98
|
+
#### Otherwise, if you get an error message like this...
|
99
|
+
|
100
|
+
```
|
101
|
+
No compiler found, expected minor version match with...
|
102
|
+
Try running "stack setup" to install the correct GHC...
|
103
|
+
```
|
104
|
+
|
105
|
+
Just do as it says and it will download and install
|
106
|
+
the correct compiler version:
|
107
|
+
|
108
|
+
```bash
|
109
|
+
stack setup
|
110
|
+
```
|
111
|
+
|
112
|
+
## Running *GHCi*
|
113
|
+
|
114
|
+
If you want to play with your solution in GHCi, just run the command:
|
115
|
+
|
116
|
+
```bash
|
117
|
+
stack ghci
|
118
|
+
```
|
119
|
+
|
120
|
+
## Feedback, Issues, Pull Requests
|
121
|
+
|
122
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
123
|
+
GitHub is the home for all of the Haskell exercises.
|
124
|
+
|
125
|
+
If you have feedback about an exercise, or want to help implementing a new
|
126
|
+
one, head over there and create an issue. We'll do our best to help you!
|
127
|
+
|
128
|
+
## Source
|
129
|
+
|
130
|
+
Josh Cheek [https://twitter.com/josh_cheek](https://twitter.com/josh_cheek)
|
131
|
+
|
132
|
+
## Submitting Incomplete Solutions
|
133
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,72 @@
|
|
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
|
+
|
14
|
+
|
15
|
+
## Getting Started
|
16
|
+
|
17
|
+
For installation and learning resources, refer to the
|
18
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
19
|
+
|
20
|
+
## Running the tests
|
21
|
+
|
22
|
+
To run the test suite, execute the following command:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
stack test
|
26
|
+
```
|
27
|
+
|
28
|
+
#### If you get an error message like this...
|
29
|
+
|
30
|
+
```
|
31
|
+
No .cabal file found in directory
|
32
|
+
```
|
33
|
+
|
34
|
+
You are probably running an old stack version and need
|
35
|
+
to upgrade it.
|
36
|
+
|
37
|
+
#### Otherwise, if you get an error message like this...
|
38
|
+
|
39
|
+
```
|
40
|
+
No compiler found, expected minor version match with...
|
41
|
+
Try running "stack setup" to install the correct GHC...
|
42
|
+
```
|
43
|
+
|
44
|
+
Just do as it says and it will download and install
|
45
|
+
the correct compiler version:
|
46
|
+
|
47
|
+
```bash
|
48
|
+
stack setup
|
49
|
+
```
|
50
|
+
|
51
|
+
## Running *GHCi*
|
52
|
+
|
53
|
+
If you want to play with your solution in GHCi, just run the command:
|
54
|
+
|
55
|
+
```bash
|
56
|
+
stack ghci
|
57
|
+
```
|
58
|
+
|
59
|
+
## Feedback, Issues, Pull Requests
|
60
|
+
|
61
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
62
|
+
GitHub is the home for all of the Haskell exercises.
|
63
|
+
|
64
|
+
If you have feedback about an exercise, or want to help implementing a new
|
65
|
+
one, head over there and create an issue. We'll do our best to help you!
|
66
|
+
|
67
|
+
## Source
|
68
|
+
|
69
|
+
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)
|
70
|
+
|
71
|
+
## Submitting Incomplete Solutions
|
72
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,128 @@
|
|
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
|
+
|
49
|
+
## Hints
|
50
|
+
|
51
|
+
To complete this exercise you need to implement the function `score`,
|
52
|
+
that takes a sequence of bowling *rolls* and returns the final score or
|
53
|
+
the appropriate error:
|
54
|
+
|
55
|
+
```haskell
|
56
|
+
score :: [Int] -> Either BowlingError Int
|
57
|
+
|
58
|
+
data BowlingError = IncompleteGame
|
59
|
+
| InvalidRoll { rollIndex :: Int, rollValue :: Int }
|
60
|
+
deriving (Eq, Show)
|
61
|
+
```
|
62
|
+
|
63
|
+
You will find these definitions already in place, but it is up to you
|
64
|
+
to define the function.
|
65
|
+
|
66
|
+
Keep in mind that the test suite expects the rolls to be numbered
|
67
|
+
starting from zero.
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
## Getting Started
|
72
|
+
|
73
|
+
For installation and learning resources, refer to the
|
74
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
75
|
+
|
76
|
+
## Running the tests
|
77
|
+
|
78
|
+
To run the test suite, execute the following command:
|
79
|
+
|
80
|
+
```bash
|
81
|
+
stack test
|
82
|
+
```
|
83
|
+
|
84
|
+
#### If you get an error message like this...
|
85
|
+
|
86
|
+
```
|
87
|
+
No .cabal file found in directory
|
88
|
+
```
|
89
|
+
|
90
|
+
You are probably running an old stack version and need
|
91
|
+
to upgrade it.
|
92
|
+
|
93
|
+
#### Otherwise, if you get an error message like this...
|
94
|
+
|
95
|
+
```
|
96
|
+
No compiler found, expected minor version match with...
|
97
|
+
Try running "stack setup" to install the correct GHC...
|
98
|
+
```
|
99
|
+
|
100
|
+
Just do as it says and it will download and install
|
101
|
+
the correct compiler version:
|
102
|
+
|
103
|
+
```bash
|
104
|
+
stack setup
|
105
|
+
```
|
106
|
+
|
107
|
+
## Running *GHCi*
|
108
|
+
|
109
|
+
If you want to play with your solution in GHCi, just run the command:
|
110
|
+
|
111
|
+
```bash
|
112
|
+
stack ghci
|
113
|
+
```
|
114
|
+
|
115
|
+
## Feedback, Issues, Pull Requests
|
116
|
+
|
117
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
118
|
+
GitHub is the home for all of the Haskell exercises.
|
119
|
+
|
120
|
+
If you have feedback about an exercise, or want to help implementing a new
|
121
|
+
one, head over there and create an issue. We'll do our best to help you!
|
122
|
+
|
123
|
+
## Source
|
124
|
+
|
125
|
+
The Bowling Game Kata at but UncleBob [http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata](http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata)
|
126
|
+
|
127
|
+
## Submitting Incomplete Solutions
|
128
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,64 @@
|
|
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
|
+
|
6
|
+
|
7
|
+
## Getting Started
|
8
|
+
|
9
|
+
For installation and learning resources, refer to the
|
10
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
11
|
+
|
12
|
+
## Running the tests
|
13
|
+
|
14
|
+
To run the test suite, execute the following command:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
stack test
|
18
|
+
```
|
19
|
+
|
20
|
+
#### If you get an error message like this...
|
21
|
+
|
22
|
+
```
|
23
|
+
No .cabal file found in directory
|
24
|
+
```
|
25
|
+
|
26
|
+
You are probably running an old stack version and need
|
27
|
+
to upgrade it.
|
28
|
+
|
29
|
+
#### Otherwise, if you get an error message like this...
|
30
|
+
|
31
|
+
```
|
32
|
+
No compiler found, expected minor version match with...
|
33
|
+
Try running "stack setup" to install the correct GHC...
|
34
|
+
```
|
35
|
+
|
36
|
+
Just do as it says and it will download and install
|
37
|
+
the correct compiler version:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
stack setup
|
41
|
+
```
|
42
|
+
|
43
|
+
## Running *GHCi*
|
44
|
+
|
45
|
+
If you want to play with your solution in GHCi, just run the command:
|
46
|
+
|
47
|
+
```bash
|
48
|
+
stack ghci
|
49
|
+
```
|
50
|
+
|
51
|
+
## Feedback, Issues, Pull Requests
|
52
|
+
|
53
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
54
|
+
GitHub is the home for all of the Haskell exercises.
|
55
|
+
|
56
|
+
If you have feedback about an exercise, or want to help implementing a new
|
57
|
+
one, head over there and create an issue. We'll do our best to help you!
|
58
|
+
|
59
|
+
## Source
|
60
|
+
|
61
|
+
Ginna Baker
|
62
|
+
|
63
|
+
## Submitting Incomplete Solutions
|
64
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,77 @@
|
|
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
|
+
|
19
|
+
|
20
|
+
## Getting Started
|
21
|
+
|
22
|
+
For installation and learning resources, refer to the
|
23
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
24
|
+
|
25
|
+
## Running the tests
|
26
|
+
|
27
|
+
To run the test suite, execute the following command:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
stack test
|
31
|
+
```
|
32
|
+
|
33
|
+
#### If you get an error message like this...
|
34
|
+
|
35
|
+
```
|
36
|
+
No .cabal file found in directory
|
37
|
+
```
|
38
|
+
|
39
|
+
You are probably running an old stack version and need
|
40
|
+
to upgrade it.
|
41
|
+
|
42
|
+
#### Otherwise, if you get an error message like this...
|
43
|
+
|
44
|
+
```
|
45
|
+
No compiler found, expected minor version match with...
|
46
|
+
Try running "stack setup" to install the correct GHC...
|
47
|
+
```
|
48
|
+
|
49
|
+
Just do as it says and it will download and install
|
50
|
+
the correct compiler version:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
stack setup
|
54
|
+
```
|
55
|
+
|
56
|
+
## Running *GHCi*
|
57
|
+
|
58
|
+
If you want to play with your solution in GHCi, just run the command:
|
59
|
+
|
60
|
+
```bash
|
61
|
+
stack ghci
|
62
|
+
```
|
63
|
+
|
64
|
+
## Feedback, Issues, Pull Requests
|
65
|
+
|
66
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
67
|
+
GitHub is the home for all of the Haskell exercises.
|
68
|
+
|
69
|
+
If you have feedback about an exercise, or want to help implementing a new
|
70
|
+
one, head over there and create an issue. We'll do our best to help you!
|
71
|
+
|
72
|
+
## Source
|
73
|
+
|
74
|
+
Software Craftsmanship - Kata-logue [http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata](http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata)
|
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,86 @@
|
|
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
|
+
|
9
|
+
## Hints
|
10
|
+
|
11
|
+
To complete this exercise you need to define the data type `Clock`,
|
12
|
+
with `Eq`, `Show` and `Num` instances, and implement the functions:
|
13
|
+
|
14
|
+
- clockHour
|
15
|
+
- clockMin
|
16
|
+
- fromHourMin
|
17
|
+
- toString
|
18
|
+
|
19
|
+
The function `fromInteger`, from `Num`, must convert minutes
|
20
|
+
to 24 hour clock time. It is not necessary to have a sensible
|
21
|
+
implementation of `abs` or `signum`.
|
22
|
+
|
23
|
+
You will find a dummy data declaration and type signatures already in place,
|
24
|
+
but it is up to you to define the functions and create a meaningful data type,
|
25
|
+
newtype or type synonym.
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
## Getting Started
|
30
|
+
|
31
|
+
For installation and learning resources, refer to the
|
32
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
33
|
+
|
34
|
+
## Running the tests
|
35
|
+
|
36
|
+
To run the test suite, execute the following command:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
stack test
|
40
|
+
```
|
41
|
+
|
42
|
+
#### If you get an error message like this...
|
43
|
+
|
44
|
+
```
|
45
|
+
No .cabal file found in directory
|
46
|
+
```
|
47
|
+
|
48
|
+
You are probably running an old stack version and need
|
49
|
+
to upgrade it.
|
50
|
+
|
51
|
+
#### Otherwise, if you get an error message like this...
|
52
|
+
|
53
|
+
```
|
54
|
+
No compiler found, expected minor version match with...
|
55
|
+
Try running "stack setup" to install the correct GHC...
|
56
|
+
```
|
57
|
+
|
58
|
+
Just do as it says and it will download and install
|
59
|
+
the correct compiler version:
|
60
|
+
|
61
|
+
```bash
|
62
|
+
stack setup
|
63
|
+
```
|
64
|
+
|
65
|
+
## Running *GHCi*
|
66
|
+
|
67
|
+
If you want to play with your solution in GHCi, just run the command:
|
68
|
+
|
69
|
+
```bash
|
70
|
+
stack ghci
|
71
|
+
```
|
72
|
+
|
73
|
+
## Feedback, Issues, Pull Requests
|
74
|
+
|
75
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
76
|
+
GitHub is the home for all of the Haskell exercises.
|
77
|
+
|
78
|
+
If you have feedback about an exercise, or want to help implementing a new
|
79
|
+
one, head over there and create an issue. We'll do our best to help you!
|
80
|
+
|
81
|
+
## Source
|
82
|
+
|
83
|
+
Pairing session with Erin Drummond [https://twitter.com/ebdrummond](https://twitter.com/ebdrummond)
|
84
|
+
|
85
|
+
## Submitting Incomplete Solutions
|
86
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,88 @@
|
|
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
|
+
|
34
|
+
## Getting Started
|
35
|
+
|
36
|
+
For installation and learning resources, refer to the
|
37
|
+
[exercism help page](http://exercism.io/languages/haskell).
|
38
|
+
|
39
|
+
## Running the tests
|
40
|
+
|
41
|
+
To run the test suite, execute the following command:
|
42
|
+
|
43
|
+
```bash
|
44
|
+
stack test
|
45
|
+
```
|
46
|
+
|
47
|
+
#### If you get an error message like this...
|
48
|
+
|
49
|
+
```
|
50
|
+
No .cabal file found in directory
|
51
|
+
```
|
52
|
+
|
53
|
+
You are probably running an old stack version and need
|
54
|
+
to upgrade it.
|
55
|
+
|
56
|
+
#### Otherwise, if you get an error message like this...
|
57
|
+
|
58
|
+
```
|
59
|
+
No compiler found, expected minor version match with...
|
60
|
+
Try running "stack setup" to install the correct GHC...
|
61
|
+
```
|
62
|
+
|
63
|
+
Just do as it says and it will download and install
|
64
|
+
the correct compiler version:
|
65
|
+
|
66
|
+
```bash
|
67
|
+
stack setup
|
68
|
+
```
|
69
|
+
|
70
|
+
## Running *GHCi*
|
71
|
+
|
72
|
+
If you want to play with your solution in GHCi, just run the command:
|
73
|
+
|
74
|
+
```bash
|
75
|
+
stack ghci
|
76
|
+
```
|
77
|
+
|
78
|
+
## Feedback, Issues, Pull Requests
|
79
|
+
|
80
|
+
The [exercism/haskell](https://github.com/exercism/haskell) repository on
|
81
|
+
GitHub is the home for all of the Haskell exercises.
|
82
|
+
|
83
|
+
If you have feedback about an exercise, or want to help implementing a new
|
84
|
+
one, head over there and create an issue. We'll do our best to help you!
|
85
|
+
|
86
|
+
|
87
|
+
## Submitting Incomplete Solutions
|
88
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|