trackler 2.2.1.99 → 2.2.1.100
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/clock/canonical-data.json +303 -204
- data/problem-specifications/exercises/complex-numbers/canonical-data.json +104 -44
- data/problem-specifications/exercises/matrix/canonical-data.json +78 -0
- data/problem-specifications/exercises/word-count/canonical-data.json +12 -12
- data/tracks/bash/config.json +128 -110
- data/tracks/c/exercises/word-count/test/test_word_count.c +2 -2
- data/tracks/dart/CONTRIBUTING.md +2 -2
- data/tracks/dart/docs/EXERCISE_README_INSERT.md +0 -1
- data/tracks/dart/docs/INSTALLATION.md +17 -11
- data/tracks/fsharp/exercises/acronym/AcronymTest.fs +3 -7
- data/tracks/fsharp/exercises/anagram/AnagramTest.fs +1 -21
- data/tracks/fsharp/exercises/book-store/BookStoreTest.fs +1 -1
- data/tracks/fsharp/exercises/complex-numbers/ComplexNumbersTest.fs +25 -25
- data/tracks/fsharp/exercises/custom-set/CustomSetTest.fs +1 -1
- data/tracks/fsharp/exercises/food-chain/FoodChainTest.fs +1 -1
- data/tracks/fsharp/exercises/gigasecond/GigasecondTest.fs +1 -1
- data/tracks/fsharp/exercises/hamming/HammingTest.fs +1 -1
- data/tracks/fsharp/exercises/hello-world/HelloWorldTest.fs +1 -1
- data/tracks/fsharp/exercises/largest-series-product/LargestSeriesProductTest.fs +1 -1
- data/tracks/fsharp/exercises/leap/LeapTest.fs +1 -1
- data/tracks/fsharp/exercises/markdown/MarkdownTest.fs +19 -19
- data/tracks/fsharp/exercises/minesweeper/MinesweeperTest.fs +27 -27
- data/tracks/fsharp/exercises/nth-prime/NthPrimeTest.fs +1 -1
- data/tracks/fsharp/exercises/nucleotide-count/NucleotideCountTest.fs +1 -1
- data/tracks/fsharp/exercises/pangram/PangramTest.fs +1 -1
- data/tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs +1 -1
- data/tracks/fsharp/exercises/perfect-numbers/PerfectNumbersTest.fs +1 -1
- data/tracks/fsharp/exercises/phone-number/PhoneNumberTest.fs +11 -3
- data/tracks/fsharp/exercises/pig-latin/PigLatinTest.fs +1 -1
- data/tracks/fsharp/exercises/protein-translation/Example.fs +2 -2
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslation.fs +1 -1
- data/tracks/fsharp/exercises/protein-translation/ProteinTranslationTest.fs +94 -60
- data/tracks/fsharp/exercises/react/ReactTest.fs +1 -1
- data/tracks/fsharp/exercises/rna-transcription/RnaTranscriptionTest.fs +1 -1
- data/tracks/fsharp/exercises/roman-numerals/RomanNumeralsTest.fs +1 -1
- data/tracks/fsharp/exercises/rotational-cipher/RotationalCipherTest.fs +1 -1
- data/tracks/fsharp/exercises/say/Example.fs +1 -1
- data/tracks/fsharp/exercises/say/SayTest.fs +21 -24
- data/tracks/fsharp/exercises/scrabble-score/ScrabbleScoreTest.fs +1 -1
- data/tracks/fsharp/exercises/secret-handshake/Example.fs +2 -2
- data/tracks/fsharp/exercises/secret-handshake/SecretHandshake.fs +1 -1
- data/tracks/fsharp/exercises/secret-handshake/SecretHandshakeTest.fs +39 -22
- data/tracks/fsharp/exercises/sieve/Example.fs +1 -1
- data/tracks/fsharp/exercises/sieve/Sieve.fs +1 -1
- data/tracks/fsharp/exercises/sieve/SieveTest.fs +19 -21
- data/tracks/fsharp/exercises/spiral-matrix/SpiralMatrixTest.fs +1 -1
- data/tracks/fsharp/exercises/sum-of-multiples/Example.fs +1 -1
- data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiples.fs +1 -1
- data/tracks/fsharp/exercises/sum-of-multiples/SumOfMultiplesTest.fs +44 -14
- data/tracks/fsharp/exercises/twelve-days/TwelveDaysTest.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/Example.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/TwoFer.fs +1 -1
- data/tracks/fsharp/exercises/two-fer/TwoFerTest.fs +4 -4
- data/tracks/fsharp/exercises/word-count/Example.fs +2 -2
- data/tracks/fsharp/exercises/word-count/WordCount.fs +2 -2
- data/tracks/fsharp/exercises/word-count/WordCountTest.fs +80 -100
- data/tracks/fsharp/exercises/wordy/Example.fs +2 -3
- data/tracks/fsharp/exercises/wordy/Wordy.fs +1 -1
- data/tracks/fsharp/exercises/wordy/WordyTest.fs +51 -49
- data/tracks/fsharp/exercises/zebra-puzzle/Example.fs +4 -4
- data/tracks/fsharp/exercises/zebra-puzzle/ZebraPuzzleTest.fs +7 -8
- data/tracks/fsharp/generators/Common.fs +3 -1
- data/tracks/fsharp/generators/Exercise.fs +12 -1
- data/tracks/fsharp/generators/Generators.fs +89 -42
- data/tracks/fsharp/generators/Generators.fsproj +1 -0
- data/tracks/fsharp/generators/Options.fs +14 -7
- data/tracks/fsharp/generators/Program.fs +3 -0
- data/tracks/fsharp/generators/Rendering.fs +0 -1
- data/tracks/fsharp/generators/Track.fs +26 -0
- data/tracks/go/exercises/custom-set/.meta/gen.go +16 -14
- data/tracks/go/exercises/custom-set/cases_test.go +2 -2
- data/tracks/java/exercises/food-chain/.meta/version +1 -0
- data/tracks/java/exercises/sieve/.meta/version +1 -0
- data/tracks/java/exercises/sieve/src/test/java/SieveTest.java +17 -0
- data/tracks/java/exercises/twelve-days/.meta/version +1 -0
- data/tracks/java/exercises/twelve-days/src/test/java/TwelveDaysTest.java +15 -3
- data/tracks/java/exercises/two-fer/.meta/version +1 -0
- data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +0 -9
- data/tracks/ocaml/config/exercise_readme.go.tmpl +38 -4
- data/tracks/ocaml/exercises/acronym/README.md +0 -2
- data/tracks/ocaml/exercises/all-your-base/README.md +1 -3
- data/tracks/ocaml/exercises/anagram/README.md +0 -1
- data/tracks/ocaml/exercises/atbash-cipher/README.md +2 -2
- data/tracks/ocaml/exercises/beer-song/README.md +2 -3
- data/tracks/ocaml/exercises/binary-search/README.md +0 -1
- data/tracks/ocaml/exercises/bob/README.md +2 -1
- data/tracks/ocaml/exercises/bowling/README.md +20 -7
- data/tracks/ocaml/exercises/bracket-push/README.md +0 -1
- data/tracks/ocaml/exercises/change/README.md +1 -2
- data/tracks/ocaml/exercises/connect/README.md +1 -3
- data/tracks/ocaml/exercises/custom-set/README.md +0 -2
- data/tracks/ocaml/exercises/difference-of-squares/README.md +0 -1
- data/tracks/ocaml/exercises/dominoes/README.md +3 -5
- data/tracks/ocaml/exercises/etl/README.md +3 -2
- data/tracks/ocaml/exercises/forth/README.md +0 -2
- data/tracks/ocaml/exercises/grade-school/README.md +0 -1
- data/tracks/ocaml/exercises/hamming/README.md +0 -1
- data/tracks/ocaml/exercises/hangman/README.md +0 -2
- data/tracks/ocaml/exercises/hello-world/README.md +0 -1
- data/tracks/ocaml/exercises/hexadecimal/README.md +0 -1
- data/tracks/ocaml/exercises/leap/README.md +1 -2
- data/tracks/ocaml/exercises/list-ops/README.md +0 -2
- data/tracks/ocaml/exercises/luhn/README.md +7 -8
- data/tracks/ocaml/exercises/meetup/README.md +16 -14
- data/tracks/ocaml/exercises/minesweeper/README.md +0 -2
- data/tracks/ocaml/exercises/nucleotide-count/README.md +8 -23
- data/tracks/ocaml/exercises/palindrome-products/README.md +0 -1
- data/tracks/ocaml/exercises/pangram/README.md +1 -2
- data/tracks/ocaml/exercises/phone-number/README.md +4 -4
- data/tracks/ocaml/exercises/prime-factors/README.md +0 -1
- data/tracks/ocaml/exercises/raindrops/README.md +0 -1
- data/tracks/ocaml/exercises/react/README.md +0 -2
- data/tracks/ocaml/{docs/EXERCISE_README_INSERT.md → exercises/rectangles/README.md} +67 -0
- data/tracks/ocaml/exercises/rna-transcription/README.md +1 -2
- data/tracks/ocaml/exercises/robot-name/README.md +0 -1
- data/tracks/ocaml/exercises/roman-numerals/README.md +1 -2
- data/tracks/ocaml/exercises/run-length-encoding/README.md +4 -5
- data/tracks/ocaml/exercises/say/README.md +0 -1
- data/tracks/ocaml/exercises/space-age/README.md +1 -2
- data/tracks/ocaml/exercises/triangle/README.md +8 -6
- data/tracks/ocaml/exercises/word-count/README.md +1 -3
- data/tracks/ocaml/exercises/zipper/README.md +1 -3
- data/tracks/perl6/.travis.yml +1 -1
- data/tracks/perl6/bin/README.md +1 -2
- data/tracks/perl6/bin/exercise-gen.pl6 +18 -18
- data/tracks/perl6/config.json +1 -0
- data/tracks/perl6/exercises/accumulate/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/accumulate/{Example.pm6 → .meta/solutions/Accumulate.pm6} +0 -0
- data/tracks/perl6/exercises/acronym/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/acronym/{Example.pm6 → .meta/solutions/Acronym.pm6} +0 -0
- data/tracks/perl6/exercises/all-your-base/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/all-your-base/{Example.pm6 → .meta/solutions/AllYourBase.pm6} +0 -0
- data/tracks/perl6/exercises/allergies/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/allergies/{Example.pm6 → .meta/solutions/Allergies.pm6} +0 -0
- data/tracks/perl6/exercises/anagram/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/anagram/{Example.pm6 → .meta/solutions/Anagram.pm6} +0 -0
- data/tracks/perl6/exercises/atbash-cipher/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/atbash-cipher/{Example.pm6 → .meta/solutions/AtbashCipher.pm6} +0 -0
- data/tracks/perl6/exercises/binary/{Example.pm6 → .meta/solutions/Trinary.pm6} +0 -0
- data/tracks/perl6/exercises/bob/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/bob/{Example.pm6 → .meta/solutions/Bob.pm6} +0 -0
- data/tracks/perl6/exercises/clock/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/clock/{Example.pm6 → .meta/solutions/Clock.pm6} +0 -0
- data/tracks/perl6/exercises/etl/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/etl/{Example.pm6 → .meta/solutions/ETL.pm6} +0 -0
- data/tracks/perl6/exercises/flatten-array/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/flatten-array/{Example.pm6 → .meta/solutions/FlattenArray.pm6} +0 -0
- data/tracks/perl6/exercises/grade-school/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/grade-school/{Example.pm6 → .meta/solutions/GradeSchool.pm6} +0 -0
- data/tracks/perl6/exercises/grains/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/grains/{Example.pm6 → .meta/solutions/Grains.pm6} +0 -0
- data/tracks/perl6/exercises/hamming/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/hamming/{Example.pm6 → .meta/solutions/Hamming.pm6} +0 -0
- data/tracks/perl6/exercises/hello-world/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/hello-world/{Example.pm6 → .meta/solutions/HelloWorld.pm6} +0 -0
- data/tracks/perl6/exercises/leap/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/leap/{Example.pm6 → .meta/solutions/Leap.pm6} +0 -0
- data/tracks/perl6/exercises/linked-list/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/linked-list/{Example.pm6 → .meta/solutions/LinkedList.pm6} +0 -0
- data/tracks/perl6/exercises/luhn/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/luhn/{Example.pm6 → .meta/solutions/Luhn.pm6} +0 -0
- data/tracks/perl6/exercises/meetup/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/meetup/{Example.pm6 → .meta/solutions/Meetup.pm6} +0 -0
- data/tracks/perl6/exercises/nucleotide-count/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/nucleotide-count/{Example.pm6 → .meta/solutions/NucleotideCount.pm6} +0 -0
- data/tracks/perl6/exercises/pangram/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/pangram/{Example.pm6 → .meta/solutions/Pangram.pm6} +0 -0
- data/tracks/perl6/exercises/phone-number/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/phone-number/{Example.pm6 → .meta/solutions/Phone.pm6} +0 -0
- data/tracks/perl6/exercises/raindrops/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/raindrops/{Example.pm6 → .meta/solutions/Raindrops.pm6} +0 -0
- data/tracks/perl6/exercises/rna-transcription/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/rna-transcription/{Example.pm6 → .meta/solutions/RNA.pm6} +0 -0
- data/tracks/perl6/exercises/robot-name/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/robot-name/{Example.pm6 → .meta/solutions/Robot.pm6} +0 -0
- data/tracks/perl6/exercises/roman-numerals/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/roman-numerals/{Example.pm6 → .meta/solutions/RomanNumerals.pm6} +0 -0
- data/tracks/perl6/exercises/scrabble-score/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/scrabble-score/{Example.pm6 → .meta/solutions/Scrabble.pm6} +0 -0
- data/tracks/perl6/exercises/space-age/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/space-age/{Example.pm6 → .meta/solutions/SpaceAge.pm6} +0 -0
- data/tracks/perl6/exercises/trinary/{Example.pm6 → .meta/solutions/Trinary.pm6} +0 -0
- data/tracks/perl6/exercises/two-fer/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/two-fer/{Example.pm6 → .meta/solutions/TwoFer.pm6} +0 -0
- data/tracks/perl6/exercises/word-count/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/word-count/{Example.pm6 → .meta/solutions/WordCount.pm6} +0 -0
- data/tracks/perl6/exercises/wordy/{example.yaml → .meta/exercise-data.yaml} +0 -0
- data/tracks/perl6/exercises/wordy/{Example.pm6 → .meta/solutions/Wordy.pm6} +0 -0
- data/tracks/perl6/t/generated-tests.t +2 -2
- data/tracks/python/config.json +12 -0
- data/tracks/python/exercises/bowling/.gitignore +0 -0
- data/tracks/python/exercises/bowling/bowling.py +11 -0
- data/tracks/python/exercises/bowling/bowling_test.py +193 -0
- data/tracks/python/exercises/bowling/example.py +149 -0
- data/tracks/python/exercises/say/say_test.py +1 -1
- data/tracks/ruby/README.md +121 -97
- data/tracks/ruby/config/exercise_readme.go.tmpl +23 -4
- data/tracks/ruby/exercises/accumulate/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/ruby/exercises/accumulate/README.md +3 -5
- data/tracks/ruby/exercises/acronym/README.md +3 -6
- data/tracks/ruby/exercises/all-your-base/README.md +4 -7
- data/tracks/ruby/exercises/allergies/README.md +3 -6
- data/tracks/ruby/exercises/alphametics/README.md +5 -8
- data/tracks/ruby/exercises/anagram/README.md +3 -5
- data/tracks/ruby/exercises/atbash-cipher/README.md +5 -6
- data/tracks/ruby/exercises/beer-song/README.md +5 -7
- data/tracks/ruby/exercises/binary-search-tree/README.md +3 -5
- data/tracks/ruby/exercises/binary-search/README.md +3 -5
- data/tracks/ruby/exercises/binary/README.md +5 -5
- data/tracks/ruby/exercises/bob/README.md +3 -5
- data/tracks/ruby/exercises/book-store/README.md +3 -5
- data/tracks/ruby/exercises/bowling/README.md +23 -11
- data/tracks/ruby/exercises/bracket-push/README.md +3 -5
- data/tracks/ruby/exercises/change/README.md +3 -5
- data/tracks/ruby/exercises/circular-buffer/README.md +16 -11
- data/tracks/ruby/exercises/clock/README.md +3 -5
- data/tracks/ruby/exercises/collatz-conjecture/README.md +4 -6
- data/tracks/ruby/exercises/complex-numbers/README.md +6 -8
- data/tracks/ruby/exercises/connect/README.md +4 -7
- data/tracks/ruby/exercises/crypto-square/README.md +3 -5
- data/tracks/ruby/exercises/custom-set/README.md +3 -6
- data/tracks/ruby/exercises/diamond/README.md +9 -11
- data/tracks/ruby/exercises/difference-of-squares/README.md +3 -5
- data/tracks/ruby/exercises/dominoes/README.md +6 -9
- data/tracks/ruby/exercises/etl/README.md +6 -6
- data/tracks/ruby/exercises/flatten-array/README.md +5 -8
- data/tracks/ruby/exercises/food-chain/README.md +4 -6
- data/tracks/ruby/exercises/gigasecond/README.md +3 -5
- data/tracks/ruby/exercises/grade-school/README.md +3 -6
- data/tracks/ruby/exercises/grains/README.md +3 -6
- data/tracks/ruby/exercises/hamming/README.md +3 -5
- data/tracks/ruby/exercises/hello-world/README.md +1 -3
- data/tracks/ruby/exercises/hexadecimal/README.md +3 -5
- data/tracks/ruby/exercises/house/README.md +5 -8
- data/tracks/ruby/exercises/isbn-verifier/README.md +4 -6
- data/tracks/ruby/exercises/isogram/README.md +5 -6
- data/tracks/ruby/exercises/kindergarten-garden/README.md +16 -18
- data/tracks/ruby/exercises/largest-series-product/README.md +3 -5
- data/tracks/ruby/exercises/leap/README.md +4 -6
- data/tracks/ruby/exercises/linked-list/README.md +13 -15
- data/tracks/ruby/exercises/list-ops/README.md +3 -6
- data/tracks/ruby/exercises/luhn/README.md +10 -12
- data/tracks/ruby/exercises/matrix/README.md +9 -9
- data/tracks/ruby/exercises/meetup/README.md +19 -18
- data/tracks/ruby/exercises/minesweeper/README.md +3 -6
- data/tracks/ruby/exercises/nth-prime/README.md +3 -5
- data/tracks/ruby/exercises/nucleotide-count/README.md +11 -27
- data/tracks/ruby/exercises/ocr-numbers/README.md +9 -11
- data/tracks/ruby/exercises/octal/README.md +9 -7
- data/tracks/ruby/exercises/palindrome-products/README.md +8 -17
- data/tracks/ruby/exercises/pangram/README.md +4 -6
- data/tracks/ruby/exercises/pascals-triangle/README.md +5 -7
- data/tracks/ruby/exercises/perfect-numbers/README.md +5 -7
- data/tracks/ruby/exercises/phone-number/README.md +7 -8
- data/tracks/ruby/exercises/pig-latin/README.md +3 -5
- data/tracks/ruby/exercises/point-mutations/README.md +3 -5
- data/tracks/ruby/exercises/poker/README.md +3 -5
- data/tracks/ruby/exercises/prime-factors/README.md +3 -5
- data/tracks/ruby/exercises/protein-translation/README.md +7 -10
- data/tracks/ruby/exercises/proverb/README.md +17 -14
- data/tracks/ruby/exercises/pythagorean-triplet/README.md +6 -8
- data/tracks/ruby/exercises/queen-attack/README.md +4 -6
- data/tracks/ruby/exercises/rail-fence-cipher/README.md +15 -12
- data/tracks/ruby/exercises/raindrops/README.md +3 -5
- data/tracks/ruby/exercises/rna-transcription/README.md +4 -6
- data/tracks/ruby/exercises/robot-name/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/ruby/exercises/robot-name/README.md +3 -5
- data/tracks/ruby/exercises/robot-simulator/README.md +3 -5
- data/tracks/ruby/exercises/roman-numerals/README.md +4 -6
- data/tracks/ruby/exercises/rotational-cipher/README.md +3 -5
- data/tracks/ruby/exercises/run-length-encoding/README.md +7 -9
- data/tracks/ruby/exercises/saddle-points/README.md +5 -7
- data/tracks/ruby/exercises/say/README.md +3 -5
- data/tracks/ruby/exercises/scale-generator/README.md +3 -7
- data/tracks/ruby/exercises/scrabble-score/README.md +6 -6
- data/tracks/ruby/exercises/secret-handshake/README.md +4 -6
- data/tracks/ruby/exercises/series/README.md +3 -5
- data/tracks/ruby/exercises/sieve/README.md +3 -5
- data/tracks/ruby/exercises/simple-cipher/README.md +7 -11
- data/tracks/ruby/exercises/simple-linked-list/README.md +3 -5
- data/tracks/ruby/exercises/space-age/README.md +4 -6
- data/tracks/ruby/exercises/strain/README.md +3 -5
- data/tracks/ruby/exercises/sum-of-multiples/README.md +6 -11
- data/tracks/ruby/exercises/tournament/README.md +8 -11
- data/tracks/ruby/exercises/transpose/README.md +10 -12
- data/tracks/ruby/exercises/triangle/README.md +12 -11
- data/tracks/ruby/exercises/trinary/README.md +4 -6
- data/tracks/ruby/exercises/twelve-days/README.md +4 -6
- data/tracks/ruby/exercises/two-bucket/README.md +13 -15
- data/tracks/ruby/exercises/two-fer/README.md +13 -39
- data/tracks/ruby/exercises/word-count/README.md +4 -7
- data/tracks/ruby/exercises/wordy/README.md +3 -10
- metadata +77 -68
- data/tracks/ruby/docs/EXERCISE_README_INSERT.md +0 -24
@@ -2,26 +2,29 @@
|
|
2
2
|
|
3
3
|
Calculate the date of meetups.
|
4
4
|
|
5
|
-
Typically meetups happen on the same day of the week. In this exercise, you
|
6
|
-
a description of a meetup date, and return the actual meetup date.
|
5
|
+
Typically meetups happen on the same day of the week. In this exercise, you
|
6
|
+
will take a description of a meetup date, and return the actual meetup date.
|
7
7
|
|
8
8
|
Examples of general descriptions are:
|
9
9
|
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
10
|
+
- The first Monday of January 2017
|
11
|
+
- The third Tuesday of January 2017
|
12
|
+
- The wednesteenth of January 2017
|
13
|
+
- The last Thursday of January 2017
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
The descriptors you are expected to parse are:
|
16
|
+
first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
|
17
|
+
thursteenth, friteenth, saturteenth, sunteenth
|
18
|
+
|
19
|
+
Note that "monteenth", "tuesteenth", etc are all made up words. There was a
|
20
|
+
meetup whose members realized that there are exactly 7 numbered days in a month
|
21
|
+
that end in '-teenth'. Therefore, one is guaranteed that each day of the week
|
18
22
|
(Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
|
19
23
|
in every month.
|
20
24
|
|
21
|
-
Given examples of a meetup dates, each containing a month, day, year, and
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
+
Given examples of a meetup dates, each containing a month, day, year, and
|
26
|
+
descriptor calculate the date of the actual meetup. For example, if given
|
27
|
+
"The first Monday of January 2017", the correct meetup date is 2017/1/2.
|
25
28
|
|
26
29
|
* * * *
|
27
30
|
|
@@ -37,15 +40,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
37
40
|
the test file, or note the alternative instruction, below, for running
|
38
41
|
the test file.
|
39
42
|
|
40
|
-
|
41
|
-
directory. For example, if the test suite is called
|
42
|
-
`hello_world_test.rb`, you can run the following command:
|
43
|
+
Run the tests from the exercise directory using the following command:
|
43
44
|
|
44
|
-
ruby
|
45
|
+
ruby meetup_test.rb
|
45
46
|
|
46
47
|
To include color from the command line:
|
47
48
|
|
48
|
-
ruby -r minitest/pride
|
49
|
+
ruby -r minitest/pride meetup_test.rb
|
49
50
|
|
50
51
|
|
51
52
|
## Source
|
@@ -40,16 +40,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
40
40
|
the test file, or note the alternative instruction, below, for running
|
41
41
|
the test file.
|
42
42
|
|
43
|
-
|
44
|
-
directory. For example, if the test suite is called
|
45
|
-
`hello_world_test.rb`, you can run the following command:
|
43
|
+
Run the tests from the exercise directory using the following command:
|
46
44
|
|
47
|
-
ruby
|
45
|
+
ruby minesweeper_test.rb
|
48
46
|
|
49
47
|
To include color from the command line:
|
50
48
|
|
51
|
-
ruby -r minitest/pride
|
52
|
-
|
49
|
+
ruby -r minitest/pride minesweeper_test.rb
|
53
50
|
|
54
51
|
|
55
52
|
## Submitting Incomplete Solutions
|
@@ -22,15 +22,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
22
22
|
the test file, or note the alternative instruction, below, for running
|
23
23
|
the test file.
|
24
24
|
|
25
|
-
|
26
|
-
directory. For example, if the test suite is called
|
27
|
-
`hello_world_test.rb`, you can run the following command:
|
25
|
+
Run the tests from the exercise directory using the following command:
|
28
26
|
|
29
|
-
ruby
|
27
|
+
ruby nth_prime_test.rb
|
30
28
|
|
31
29
|
To include color from the command line:
|
32
30
|
|
33
|
-
ruby -r minitest/pride
|
31
|
+
ruby -r minitest/pride nth_prime_test.rb
|
34
32
|
|
35
33
|
|
36
34
|
## Source
|
@@ -1,30 +1,16 @@
|
|
1
1
|
# Nucleotide Count
|
2
2
|
|
3
|
-
Given a DNA string, compute how many times each nucleotide occurs in the string.
|
3
|
+
Given a single stranded DNA string, compute how many times each nucleotide occurs in the string.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
Each symbol represents a nucleotide, which is a fancy name for the
|
9
|
-
particular molecules that happen to make up a large part of DNA.
|
10
|
-
|
11
|
-
Shortest intro to biochemistry EVAR:
|
5
|
+
The genetic language of every living thing on the planet is DNA.
|
6
|
+
DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides.
|
7
|
+
4 types exist in DNA and these differ only slightly and can be represented as the following symbols: 'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' thymine.
|
12
8
|
|
9
|
+
Here is an analogy:
|
13
10
|
- twigs are to birds nests as
|
14
|
-
- nucleotides are to DNA
|
15
|
-
-
|
16
|
-
-
|
17
|
-
- oh crap lipids
|
18
|
-
|
19
|
-
I'm not going to talk about lipids because they're crazy complex.
|
20
|
-
|
21
|
-
So back to nucleotides.
|
22
|
-
|
23
|
-
DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine
|
24
|
-
(`G`), and thymine (`T`).
|
25
|
-
|
26
|
-
RNA contains a slightly different set of nucleotides, but we don't care
|
27
|
-
about that for now.
|
11
|
+
- nucleotides are to DNA as
|
12
|
+
- legos are to lego houses as
|
13
|
+
- words are to sentences as...
|
28
14
|
|
29
15
|
* * * *
|
30
16
|
|
@@ -40,15 +26,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
40
26
|
the test file, or note the alternative instruction, below, for running
|
41
27
|
the test file.
|
42
28
|
|
43
|
-
|
44
|
-
directory. For example, if the test suite is called
|
45
|
-
`hello_world_test.rb`, you can run the following command:
|
29
|
+
Run the tests from the exercise directory using the following command:
|
46
30
|
|
47
|
-
ruby
|
31
|
+
ruby nucleotide_count_test.rb
|
48
32
|
|
49
33
|
To include color from the command line:
|
50
34
|
|
51
|
-
ruby -r minitest/pride
|
35
|
+
ruby -r minitest/pride nucleotide_count_test.rb
|
52
36
|
|
53
37
|
|
54
38
|
## Source
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# OCR Numbers
|
2
2
|
|
3
3
|
Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is
|
4
4
|
represented, or whether it is garbled.
|
@@ -9,7 +9,7 @@ To begin with, convert a simple binary font to a string containing 0 or 1.
|
|
9
9
|
|
10
10
|
The binary font uses pipes and underscores, four rows high and three columns wide.
|
11
11
|
|
12
|
-
```
|
12
|
+
```text
|
13
13
|
_ #
|
14
14
|
| | # zero.
|
15
15
|
|_| #
|
@@ -18,7 +18,7 @@ The binary font uses pipes and underscores, four rows high and three columns wid
|
|
18
18
|
|
19
19
|
Is converted to "0"
|
20
20
|
|
21
|
-
```
|
21
|
+
```text
|
22
22
|
#
|
23
23
|
| # one.
|
24
24
|
| #
|
@@ -39,7 +39,7 @@ Update your program to recognize multi-character binary strings, replacing garbl
|
|
39
39
|
|
40
40
|
Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.
|
41
41
|
|
42
|
-
```
|
42
|
+
```text
|
43
43
|
_
|
44
44
|
_|
|
45
45
|
|_
|
@@ -48,7 +48,7 @@ Update your program to recognize all numbers 0 through 9, both individually and
|
|
48
48
|
|
49
49
|
Is converted to "2"
|
50
50
|
|
51
|
-
```
|
51
|
+
```text
|
52
52
|
_ _ _ _ _ _ _ _ #
|
53
53
|
| _| _||_||_ |_ ||_||_|| | # decimal numbers.
|
54
54
|
||_ _| | _||_| ||_| _||_| #
|
@@ -61,7 +61,7 @@ Is converted to "1234567890"
|
|
61
61
|
|
62
62
|
Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas.
|
63
63
|
|
64
|
-
```
|
64
|
+
```text
|
65
65
|
_ _
|
66
66
|
| _| _|
|
67
67
|
||_ _|
|
@@ -92,15 +92,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
92
92
|
the test file, or note the alternative instruction, below, for running
|
93
93
|
the test file.
|
94
94
|
|
95
|
-
|
96
|
-
directory. For example, if the test suite is called
|
97
|
-
`hello_world_test.rb`, you can run the following command:
|
95
|
+
Run the tests from the exercise directory using the following command:
|
98
96
|
|
99
|
-
ruby
|
97
|
+
ruby ocr_numbers_test.rb
|
100
98
|
|
101
99
|
To include color from the command line:
|
102
100
|
|
103
|
-
ruby -r minitest/pride
|
101
|
+
ruby -r minitest/pride ocr_numbers_test.rb
|
104
102
|
|
105
103
|
|
106
104
|
## Source
|
@@ -8,11 +8,13 @@ Implement octal to decimal conversion. Given an octal input
|
|
8
8
|
string, your program should produce a decimal output.
|
9
9
|
|
10
10
|
## Note
|
11
|
+
|
11
12
|
- Implement the conversion yourself.
|
12
13
|
Do not use something else to perform the conversion for you.
|
13
14
|
- Treat invalid input as octal 0.
|
14
15
|
|
15
16
|
## About Octal (Base-8)
|
17
|
+
|
16
18
|
Decimal is a base-10 system.
|
17
19
|
|
18
20
|
A number 233 in base 10 notation can be understood
|
@@ -25,7 +27,8 @@ as a linear combination of powers of 10:
|
|
25
27
|
- All these values are summed.
|
26
28
|
|
27
29
|
So:
|
28
|
-
|
30
|
+
|
31
|
+
```text
|
29
32
|
233 # decimal
|
30
33
|
= 2*10^2 + 3*10^1 + 3*10^0
|
31
34
|
= 2*100 + 3*10 + 3*1
|
@@ -34,7 +37,8 @@ So:
|
|
34
37
|
Octal is similar, but uses powers of 8 rather than powers of 10.
|
35
38
|
|
36
39
|
So:
|
37
|
-
|
40
|
+
|
41
|
+
```text
|
38
42
|
233 # octal
|
39
43
|
= 2*8^2 + 3*8^1 + 3*8^0
|
40
44
|
= 2*64 + 3*8 + 3*1
|
@@ -56,15 +60,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
56
60
|
the test file, or note the alternative instruction, below, for running
|
57
61
|
the test file.
|
58
62
|
|
59
|
-
|
60
|
-
directory. For example, if the test suite is called
|
61
|
-
`hello_world_test.rb`, you can run the following command:
|
63
|
+
Run the tests from the exercise directory using the following command:
|
62
64
|
|
63
|
-
ruby
|
65
|
+
ruby octal_test.rb
|
64
66
|
|
65
67
|
To include color from the command line:
|
66
68
|
|
67
|
-
ruby -r minitest/pride
|
69
|
+
ruby -r minitest/pride octal_test.rb
|
68
70
|
|
69
71
|
|
70
72
|
## Source
|
@@ -5,19 +5,12 @@ Detect palindrome products in a given range.
|
|
5
5
|
A palindromic number is a number that remains the same when its digits are
|
6
6
|
reversed. For example, `121` is a palindromic number but `112` is not.
|
7
7
|
|
8
|
-
Given
|
9
|
-
|
10
|
-
`a` and `b` are integers (possibly, but _not_ necessarily palindromic numbers).
|
8
|
+
Given a range of numbers, find the largest and smallest palindromes which
|
9
|
+
are products of numbers within that range.
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
It's possible (and indeed common) for a palindrome product to be the product
|
16
|
-
of multiple combinations of numbers. For example, the palindrome product `9` has
|
17
|
-
the factors `(1, 9)` and `(3, 3)`.
|
18
|
-
|
19
|
-
Write a program that given a range of integers, returns the smallest and largest
|
20
|
-
palindromic product of factors within that range, along with all the factors in the range for that product.
|
11
|
+
Your solution should return the largest and smallest palindromes, along with the
|
12
|
+
factors of each within the range. If the largest or smallest palindrome has more
|
13
|
+
than one pair of factors within the range, then return all the pairs.
|
21
14
|
|
22
15
|
## Example 1
|
23
16
|
|
@@ -53,15 +46,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
53
46
|
the test file, or note the alternative instruction, below, for running
|
54
47
|
the test file.
|
55
48
|
|
56
|
-
|
57
|
-
directory. For example, if the test suite is called
|
58
|
-
`hello_world_test.rb`, you can run the following command:
|
49
|
+
Run the tests from the exercise directory using the following command:
|
59
50
|
|
60
|
-
ruby
|
51
|
+
ruby palindrome_products_test.rb
|
61
52
|
|
62
53
|
To include color from the command line:
|
63
54
|
|
64
|
-
ruby -r minitest/pride
|
55
|
+
ruby -r minitest/pride palindrome_products_test.rb
|
65
56
|
|
66
57
|
|
67
58
|
## Source
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma,
|
4
4
|
"every letter") is a sentence using every letter of the alphabet at least once.
|
5
|
-
The best known English pangram is:
|
5
|
+
The best known English pangram is:
|
6
6
|
> The quick brown fox jumps over the lazy dog.
|
7
7
|
|
8
8
|
The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case
|
@@ -22,15 +22,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
22
22
|
the test file, or note the alternative instruction, below, for running
|
23
23
|
the test file.
|
24
24
|
|
25
|
-
|
26
|
-
directory. For example, if the test suite is called
|
27
|
-
`hello_world_test.rb`, you can run the following command:
|
25
|
+
Run the tests from the exercise directory using the following command:
|
28
26
|
|
29
|
-
ruby
|
27
|
+
ruby pangram_test.rb
|
30
28
|
|
31
29
|
To include color from the command line:
|
32
30
|
|
33
|
-
ruby -r minitest/pride
|
31
|
+
ruby -r minitest/pride pangram_test.rb
|
34
32
|
|
35
33
|
|
36
34
|
## Source
|
@@ -1,11 +1,11 @@
|
|
1
|
-
#
|
1
|
+
# Pascal's Triangle
|
2
2
|
|
3
3
|
Compute Pascal's triangle up to a given number of rows.
|
4
4
|
|
5
5
|
In Pascal's Triangle each number is computed by adding the numbers to
|
6
6
|
the right and left of the current position in the previous row.
|
7
7
|
|
8
|
-
```
|
8
|
+
```text
|
9
9
|
1
|
10
10
|
1 1
|
11
11
|
1 2 1
|
@@ -28,15 +28,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
28
28
|
the test file, or note the alternative instruction, below, for running
|
29
29
|
the test file.
|
30
30
|
|
31
|
-
|
32
|
-
directory. For example, if the test suite is called
|
33
|
-
`hello_world_test.rb`, you can run the following command:
|
31
|
+
Run the tests from the exercise directory using the following command:
|
34
32
|
|
35
|
-
ruby
|
33
|
+
ruby pascals_triangle_test.rb
|
36
34
|
|
37
35
|
To include color from the command line:
|
38
36
|
|
39
|
-
ruby -r minitest/pride
|
37
|
+
ruby -r minitest/pride pascals_triangle_test.rb
|
40
38
|
|
41
39
|
|
42
40
|
## Source
|
@@ -5,7 +5,7 @@ Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
|
|
5
5
|
|
6
6
|
The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9
|
7
7
|
|
8
|
-
- **Perfect**: aliquot sum = number
|
8
|
+
- **Perfect**: aliquot sum = number
|
9
9
|
- 6 is a perfect number because (1 + 2 + 3) = 6
|
10
10
|
- 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28
|
11
11
|
- **Abundant**: aliquot sum > number
|
@@ -14,7 +14,7 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d
|
|
14
14
|
- **Deficient**: aliquot sum < number
|
15
15
|
- 8 is a deficient number because (1 + 2 + 4) = 7
|
16
16
|
- Prime numbers are deficient
|
17
|
-
|
17
|
+
|
18
18
|
Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**.
|
19
19
|
|
20
20
|
* * * *
|
@@ -31,15 +31,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
31
31
|
the test file, or note the alternative instruction, below, for running
|
32
32
|
the test file.
|
33
33
|
|
34
|
-
|
35
|
-
directory. For example, if the test suite is called
|
36
|
-
`hello_world_test.rb`, you can run the following command:
|
34
|
+
Run the tests from the exercise directory using the following command:
|
37
35
|
|
38
|
-
ruby
|
36
|
+
ruby perfect_numbers_test.rb
|
39
37
|
|
40
38
|
To include color from the command line:
|
41
39
|
|
42
|
-
ruby -r minitest/pride
|
40
|
+
ruby -r minitest/pride perfect_numbers_test.rb
|
43
41
|
|
44
42
|
|
45
43
|
## Source
|
@@ -6,14 +6,15 @@ The **North American Numbering Plan (NANP)** is a telephone numbering system use
|
|
6
6
|
|
7
7
|
NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*.
|
8
8
|
|
9
|
-
|
10
9
|
The format is usually represented as
|
11
|
-
|
10
|
+
|
11
|
+
```text
|
12
12
|
(NXX)-NXX-XXXX
|
13
13
|
```
|
14
|
+
|
14
15
|
where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9.
|
15
16
|
|
16
|
-
Your task is to clean up differently
|
17
|
+
Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present.
|
17
18
|
|
18
19
|
For example, the inputs
|
19
20
|
- `+1 (613)-995-0253`
|
@@ -41,15 +42,13 @@ If you would like color output, you can `require 'minitest/pride'` in
|
|
41
42
|
the test file, or note the alternative instruction, below, for running
|
42
43
|
the test file.
|
43
44
|
|
44
|
-
|
45
|
-
directory. For example, if the test suite is called
|
46
|
-
`hello_world_test.rb`, you can run the following command:
|
45
|
+
Run the tests from the exercise directory using the following command:
|
47
46
|
|
48
|
-
ruby
|
47
|
+
ruby phone_number_test.rb
|
49
48
|
|
50
49
|
To include color from the command line:
|
51
50
|
|
52
|
-
ruby -r minitest/pride
|
51
|
+
ruby -r minitest/pride phone_number_test.rb
|
53
52
|
|
54
53
|
|
55
54
|
## Source
|