trackler 2.2.1.40 → 2.2.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/dot-dsl/metadata.yml +1 -0
- data/problem-specifications/exercises/etl/metadata.yml +1 -0
- data/problem-specifications/exercises/isogram/canonical-data.json +3 -3
- data/problem-specifications/exercises/ocr-numbers/metadata.yml +1 -0
- data/problem-specifications/exercises/pascals-triangle/metadata.yml +1 -0
- data/problem-specifications/exercises/pov/metadata.yml +1 -0
- data/problem-specifications/exercises/rna-transcription/metadata.yml +1 -0
- data/problem-specifications/exercises/sgf-parsing/metadata.yml +1 -0
- data/tracks/c/exercises/all-your-base/src/example.c +14 -14
- data/tracks/c/exercises/all-your-base/src/example.h +2 -2
- data/tracks/ceylon/exercises/hamming/source/hamming/HammingTest.ceylon +1 -1
- data/tracks/ceylon/exercises/rna-transcription/source/rnatranscription/{RNAtest.ceylon → RNATest.ceylon} +0 -0
- data/tracks/cfml/.git +1 -0
- data/tracks/cfml/.gitignore +5 -0
- data/tracks/cfml/.travis.yml +18 -0
- data/tracks/cfml/CONTRIBUTING.md +10 -0
- data/tracks/cfml/LICENSE +21 -0
- data/tracks/cfml/README.md +92 -0
- data/tracks/cfml/bin/fetch-configlet +32 -0
- data/tracks/cfml/config/exercise_readme.go.tmpl +16 -0
- data/tracks/cfml/config/maintainers.json +13 -0
- data/tracks/cfml/config.json +223 -0
- data/tracks/cfml/docs/ABOUT.md +10 -0
- data/tracks/cfml/docs/EXERCISE_README_INSERT.md +15 -0
- data/tracks/cfml/docs/INSTALLATION.md +35 -0
- data/tracks/cfml/docs/LEARNING.md +37 -0
- data/tracks/cfml/docs/RESOURCES.md +29 -0
- data/tracks/cfml/docs/SNIPPET.txt +8 -0
- data/tracks/cfml/docs/TESTS.md +13 -0
- data/tracks/cfml/exercises/acronym/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/acronym/Acronym.cfc +13 -0
- data/tracks/cfml/exercises/acronym/AcronymTest.cfc +43 -0
- data/tracks/cfml/exercises/acronym/Solution.cfc +22 -0
- data/tracks/cfml/exercises/acronym/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/acronym/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/acronym/box.json +8 -0
- data/tracks/cfml/exercises/acronym/index.cfm +37 -0
- data/tracks/cfml/exercises/atbash-cipher/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/atbash-cipher/AtbashCipher.cfc +14 -0
- data/tracks/cfml/exercises/atbash-cipher/AtbashCipherTest.cfc +71 -0
- data/tracks/cfml/exercises/atbash-cipher/Solution.cfc +56 -0
- data/tracks/cfml/exercises/atbash-cipher/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/atbash-cipher/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/atbash-cipher/box.json +8 -0
- data/tracks/cfml/exercises/atbash-cipher/index.cfm +37 -0
- data/tracks/cfml/exercises/bob/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/bob/Bob.cfc +13 -0
- data/tracks/cfml/exercises/bob/BobTest.cfc +115 -0
- data/tracks/cfml/exercises/bob/Solution.cfc +27 -0
- data/tracks/cfml/exercises/bob/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/bob/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/bob/box.json +8 -0
- data/tracks/cfml/exercises/bob/index.cfm +37 -0
- data/tracks/cfml/exercises/diamond/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/diamond/Diamond.cfc +13 -0
- data/tracks/cfml/exercises/diamond/DiamondTest.cfc +35 -0
- data/tracks/cfml/exercises/diamond/Solution.cfc +35 -0
- data/tracks/cfml/exercises/diamond/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/diamond/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/diamond/box.json +8 -0
- data/tracks/cfml/exercises/diamond/index.cfm +37 -0
- data/tracks/cfml/exercises/difference-of-squares/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/difference-of-squares/DifferenceOfSquares.cfc +18 -0
- data/tracks/cfml/exercises/difference-of-squares/DifferenceOfSquaresTest.cfc +63 -0
- data/tracks/cfml/exercises/difference-of-squares/Solution.cfc +28 -0
- data/tracks/cfml/exercises/difference-of-squares/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/difference-of-squares/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/difference-of-squares/box.json +8 -0
- data/tracks/cfml/exercises/difference-of-squares/index.cfm +37 -0
- data/tracks/cfml/exercises/flatten-array/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/flatten-array/FlattenArray.cfc +13 -0
- data/tracks/cfml/exercises/flatten-array/FlattenArrayTest.cfc +42 -0
- data/tracks/cfml/exercises/flatten-array/Solution.cfc +26 -0
- data/tracks/cfml/exercises/flatten-array/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/flatten-array/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/flatten-array/box.json +8 -0
- data/tracks/cfml/exercises/flatten-array/index.cfm +37 -0
- data/tracks/cfml/exercises/gigasecond/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/gigasecond/Gigasecond.cfc +13 -0
- data/tracks/cfml/exercises/gigasecond/GigasecondTest.cfc +39 -0
- data/tracks/cfml/exercises/gigasecond/Solution.cfc +16 -0
- data/tracks/cfml/exercises/gigasecond/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/gigasecond/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/gigasecond/box.json +8 -0
- data/tracks/cfml/exercises/gigasecond/index.cfm +37 -0
- data/tracks/cfml/exercises/grains/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/grains/Grains.cfc +14 -0
- data/tracks/cfml/exercises/grains/GrainsTest.cfc +63 -0
- data/tracks/cfml/exercises/grains/Solution.cfc +22 -0
- data/tracks/cfml/exercises/grains/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/grains/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/grains/box.json +8 -0
- data/tracks/cfml/exercises/grains/index.cfm +37 -0
- data/tracks/cfml/exercises/hamming/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/hamming/Hamming.cfc +13 -0
- data/tracks/cfml/exercises/hamming/HammingTest.cfc +75 -0
- data/tracks/cfml/exercises/hamming/Solution.cfc +25 -0
- data/tracks/cfml/exercises/hamming/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/hamming/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/hamming/box.json +8 -0
- data/tracks/cfml/exercises/hamming/index.cfm +37 -0
- data/tracks/cfml/exercises/hello-world/HelloWorld.cfc +13 -0
- data/tracks/cfml/exercises/hello-world/HelloWorldTest.cfc +18 -0
- data/tracks/cfml/exercises/hello-world/Solution.cfc +13 -0
- data/tracks/cfml/exercises/hello-world/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/hello-world/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/hello-world/box.json +8 -0
- data/tracks/cfml/exercises/hello-world/index.cfm +37 -0
- data/tracks/cfml/exercises/isogram/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/isogram/Isogram.cfc +13 -0
- data/tracks/cfml/exercises/isogram/IsogramTest.cfc +55 -0
- data/tracks/cfml/exercises/isogram/Solution.cfc +23 -0
- data/tracks/cfml/exercises/isogram/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/isogram/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/isogram/box.json +8 -0
- data/tracks/cfml/exercises/isogram/index.cfm +37 -0
- data/tracks/cfml/exercises/largest-series-product/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/largest-series-product/LargestSeriesProduct.cfc +13 -0
- data/tracks/cfml/exercises/largest-series-product/LargestSeriesProductTest.cfc +75 -0
- data/tracks/cfml/exercises/largest-series-product/Solution.cfc +41 -0
- data/tracks/cfml/exercises/largest-series-product/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/largest-series-product/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/largest-series-product/box.json +8 -0
- data/tracks/cfml/exercises/largest-series-product/index.cfm +37 -0
- data/tracks/cfml/exercises/leap/Leap.cfc +15 -0
- data/tracks/cfml/exercises/leap/LeapTest.cfc +39 -0
- data/tracks/cfml/exercises/leap/README.md +33 -0
- data/tracks/cfml/exercises/leap/Solution.cfc +19 -0
- data/tracks/cfml/exercises/leap/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/leap/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/leap/box.json +8 -0
- data/tracks/cfml/exercises/leap/index.cfm +37 -0
- data/tracks/cfml/exercises/luhn/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/luhn/Luhn.cfc +13 -0
- data/tracks/cfml/exercises/luhn/LuhnTest.cfc +67 -0
- data/tracks/cfml/exercises/luhn/Solution.cfc +38 -0
- data/tracks/cfml/exercises/luhn/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/luhn/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/luhn/box.json +8 -0
- data/tracks/cfml/exercises/luhn/index.cfm +37 -0
- data/tracks/cfml/exercises/nth-prime/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/nth-prime/NthPrime.cfc +13 -0
- data/tracks/cfml/exercises/nth-prime/NthPrimeTest.cfc +35 -0
- data/tracks/cfml/exercises/nth-prime/Solution.cfc +33 -0
- data/tracks/cfml/exercises/nth-prime/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/nth-prime/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/nth-prime/box.json +8 -0
- data/tracks/cfml/exercises/nth-prime/index.cfm +37 -0
- data/tracks/cfml/exercises/pangram/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/pangram/Pangram.cfc +13 -0
- data/tracks/cfml/exercises/pangram/PangramTest.cfc +55 -0
- data/tracks/cfml/exercises/pangram/Solution.cfc +21 -0
- data/tracks/cfml/exercises/pangram/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/pangram/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/pangram/box.json +8 -0
- data/tracks/cfml/exercises/pangram/index.cfm +37 -0
- data/tracks/cfml/exercises/pig-latin/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/pig-latin/PigLatin.cfc +13 -0
- data/tracks/cfml/exercises/pig-latin/PigLatinTest.cfc +115 -0
- data/tracks/cfml/exercises/pig-latin/Solution.cfc +30 -0
- data/tracks/cfml/exercises/pig-latin/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/pig-latin/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/pig-latin/box.json +8 -0
- data/tracks/cfml/exercises/pig-latin/index.cfm +37 -0
- data/tracks/cfml/exercises/raindrops/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/raindrops/Raindrops.cfc +13 -0
- data/tracks/cfml/exercises/raindrops/RaindropsTest.cfc +87 -0
- data/tracks/cfml/exercises/raindrops/Solution.cfc +33 -0
- data/tracks/cfml/exercises/raindrops/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/raindrops/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/raindrops/box.json +8 -0
- data/tracks/cfml/exercises/raindrops/index.cfm +37 -0
- data/tracks/cfml/exercises/rna-transcription/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/rna-transcription/RnaTranscription.cfc +13 -0
- data/tracks/cfml/exercises/rna-transcription/RnaTranscriptionTest.cfc +47 -0
- data/tracks/cfml/exercises/rna-transcription/Solution.cfc +35 -0
- data/tracks/cfml/exercises/rna-transcription/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/rna-transcription/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/rna-transcription/box.json +8 -0
- data/tracks/cfml/exercises/rna-transcription/index.cfm +37 -0
- data/tracks/cfml/exercises/saddle-points/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/saddle-points/SaddlePoints.cfc +13 -0
- data/tracks/cfml/exercises/saddle-points/SaddlePointsTest.cfc +35 -0
- data/tracks/cfml/exercises/saddle-points/Solution.cfc +59 -0
- data/tracks/cfml/exercises/saddle-points/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/saddle-points/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/saddle-points/box.json +8 -0
- data/tracks/cfml/exercises/saddle-points/index.cfm +37 -0
- data/tracks/cfml/exercises/scrabble-score/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/scrabble-score/ScrabbleScore.cfc +13 -0
- data/tracks/cfml/exercises/scrabble-score/ScrabbleScoreTest.cfc +59 -0
- data/tracks/cfml/exercises/scrabble-score/Solution.cfc +50 -0
- data/tracks/cfml/exercises/scrabble-score/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/scrabble-score/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/scrabble-score/box.json +8 -0
- data/tracks/cfml/exercises/scrabble-score/index.cfm +37 -0
- data/tracks/cfml/exercises/secret-handshake/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/secret-handshake/SecretHandshake.cfc +13 -0
- data/tracks/cfml/exercises/secret-handshake/SecretHandshakeTest.cfc +63 -0
- data/tracks/cfml/exercises/secret-handshake/Solution.cfc +31 -0
- data/tracks/cfml/exercises/secret-handshake/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/secret-handshake/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/secret-handshake/box.json +8 -0
- data/tracks/cfml/exercises/secret-handshake/index.cfm +37 -0
- data/tracks/cfml/exercises/space-age/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/space-age/Solution.cfc +28 -0
- data/tracks/cfml/exercises/space-age/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/space-age/SpaceAge.cfc +13 -0
- data/tracks/cfml/exercises/space-age/SpaceAgeTest.cfc +47 -0
- data/tracks/cfml/exercises/space-age/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/space-age/box.json +8 -0
- data/tracks/cfml/exercises/space-age/index.cfm +37 -0
- data/tracks/cfml/exercises/sum-of-multiples/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/sum-of-multiples/Solution.cfc +27 -0
- data/tracks/cfml/exercises/sum-of-multiples/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/sum-of-multiples/SumOfMultiples.cfc +13 -0
- data/tracks/cfml/exercises/sum-of-multiples/SumOfMultiplesTest.cfc +63 -0
- data/tracks/cfml/exercises/sum-of-multiples/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/sum-of-multiples/box.json +8 -0
- data/tracks/cfml/exercises/sum-of-multiples/index.cfm +37 -0
- data/tracks/cfml/exercises/triangle/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/triangle/Solution.cfc +53 -0
- data/tracks/cfml/exercises/triangle/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/triangle/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/triangle/Triangle.cfc +18 -0
- data/tracks/cfml/exercises/triangle/TriangleTest.cfc +95 -0
- data/tracks/cfml/exercises/triangle/box.json +8 -0
- data/tracks/cfml/exercises/triangle/index.cfm +37 -0
- data/tracks/cfml/exercises/word-count/.meta/HINTS.md +0 -0
- data/tracks/cfml/exercises/word-count/Solution.cfc +22 -0
- data/tracks/cfml/exercises/word-count/SolutionTest.cfc +7 -0
- data/tracks/cfml/exercises/word-count/TestRunner.cfc +103 -0
- data/tracks/cfml/exercises/word-count/WordCount.cfc +13 -0
- data/tracks/cfml/exercises/word-count/WordCountTest.cfc +55 -0
- data/tracks/cfml/exercises/word-count/box.json +8 -0
- data/tracks/cfml/exercises/word-count/index.cfm +37 -0
- data/tracks/cfml/img/icon.png +0 -0
- data/tracks/cfml/tasks/GenerateTests.cfc +179 -0
- data/tracks/cfml/tasks/ScaffoldExercise.cfc +85 -0
- data/tracks/cfml/tasks/TestAllSolutions.cfc +24 -0
- data/tracks/cfml/tasks/exercise_template/.meta/HINTS.md +0 -0
- data/tracks/cfml/tasks/exercise_template/@@name@@.cfc +13 -0
- data/tracks/cfml/tasks/exercise_template/@@name@@Test.cfc +15 -0
- data/tracks/cfml/tasks/exercise_template/Solution.cfc +6 -0
- data/tracks/cfml/tasks/exercise_template/SolutionTest.cfc +7 -0
- data/tracks/cfml/tasks/exercise_template/TestRunner.cfc +103 -0
- data/tracks/cfml/tasks/exercise_template/box.json +8 -0
- data/tracks/cfml/tasks/exercise_template/index.cfm +37 -0
- data/tracks/coldfusion/docs/ABOUT.md +8 -6
- data/tracks/csharp/docs/GENERATORS.md +7 -0
- data/tracks/csharp/exercises/clock/ClockTest.cs +15 -15
- data/tracks/csharp/exercises/nucleotide-count/Example.cs +10 -11
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCount.cs +2 -7
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs +37 -47
- data/tracks/csharp/exercises/pig-latin/Example.cs +1 -1
- data/tracks/csharp/exercises/pig-latin/PigLatinTest.cs +19 -7
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +7 -1
- data/tracks/csharp/exercises/tournament/Example.cs +1 -1
- data/tracks/csharp/exercises/tournament/TournamentTest.cs +151 -68
- data/tracks/csharp/exercises/triangle/Example.cs +26 -8
- data/tracks/csharp/exercises/triangle/Triangle.cs +16 -1
- data/tracks/csharp/exercises/triangle/TriangleTest.cs +44 -30
- data/tracks/csharp/generators/Exercise.cs +6 -1
- data/tracks/csharp/generators/Exercises/Clock.cs +17 -1
- data/tracks/csharp/generators/Exercises/NucleotideCount.cs +61 -0
- data/tracks/csharp/generators/Exercises/Tournament.cs +66 -0
- data/tracks/csharp/generators/Exercises/Triangle.cs +36 -0
- data/tracks/dart/config.json +15 -2
- data/tracks/dart/exercises/raindrops/lib/example.dart +23 -0
- data/tracks/dart/exercises/raindrops/lib/raindrops.dart +3 -0
- data/tracks/dart/exercises/raindrops/pubspec.lock +281 -0
- data/tracks/dart/exercises/raindrops/pubspec.yaml +3 -0
- data/tracks/dart/exercises/raindrops/test/raindrops_test.dart +94 -0
- data/tracks/delphi/exercises/pig-latin/uPigLatinExample.pas +1 -25
- data/tracks/haskell/config.json +9 -0
- data/tracks/haskell/exercises/acronym/README.md +0 -1
- data/tracks/haskell/exercises/all-your-base/README.md +1 -1
- data/tracks/haskell/exercises/allergies/README.md +0 -1
- data/tracks/haskell/exercises/alphametics/README.md +2 -2
- data/tracks/haskell/exercises/atbash-cipher/README.md +2 -1
- data/tracks/haskell/exercises/beer-song/README.md +1 -1
- data/tracks/haskell/exercises/binary/README.md +2 -0
- data/tracks/haskell/exercises/bowling/README.md +20 -6
- data/tracks/haskell/exercises/collatz-conjecture/README.md +1 -1
- data/tracks/haskell/exercises/connect/README.md +1 -1
- data/tracks/haskell/exercises/crypto-square/README.md +4 -4
- data/tracks/haskell/exercises/diamond/README.md +113 -0
- data/tracks/haskell/exercises/diamond/examples/success-standard/package.yaml +16 -0
- data/tracks/haskell/exercises/diamond/examples/success-standard/src/Diamond.hs +16 -0
- data/tracks/haskell/exercises/diamond/package.yaml +20 -0
- data/tracks/haskell/exercises/diamond/src/Diamond.hs +4 -0
- data/tracks/haskell/exercises/diamond/stack.yaml +1 -0
- data/tracks/haskell/exercises/diamond/test/Tests.hs +109 -0
- data/tracks/haskell/exercises/etl/README.md +3 -1
- data/tracks/haskell/exercises/food-chain/README.md +1 -1
- data/tracks/haskell/exercises/go-counting/README.md +1 -1
- data/tracks/haskell/exercises/grade-school/README.md +0 -1
- data/tracks/haskell/exercises/grains/README.md +0 -1
- data/tracks/haskell/exercises/house/README.md +1 -2
- data/tracks/haskell/exercises/isogram/README.md +2 -1
- data/tracks/haskell/exercises/kindergarten-garden/README.md +3 -3
- data/tracks/haskell/exercises/leap/README.md +1 -1
- data/tracks/haskell/exercises/linked-list/README.md +10 -10
- data/tracks/haskell/exercises/luhn/README.md +7 -7
- data/tracks/haskell/exercises/matrix/README.md +6 -4
- data/tracks/haskell/exercises/meetup/README.md +1 -2
- data/tracks/haskell/exercises/nucleotide-count/README.md +8 -22
- data/tracks/haskell/exercises/ocr-numbers/README.md +6 -6
- data/tracks/haskell/exercises/octal/README.md +6 -2
- data/tracks/haskell/exercises/palindrome-products/README.md +12 -6
- data/tracks/haskell/exercises/pangram/README.md +1 -1
- data/tracks/haskell/exercises/pascals-triangle/README.md +2 -2
- data/tracks/haskell/exercises/phone-number/README.md +3 -2
- data/tracks/haskell/exercises/pov/README.md +3 -3
- data/tracks/haskell/exercises/pythagorean-triplet/README.md +3 -3
- data/tracks/haskell/exercises/queen-attack/README.md +1 -1
- data/tracks/haskell/exercises/rna-transcription/README.md +1 -1
- data/tracks/haskell/exercises/roman-numerals/README.md +1 -1
- data/tracks/haskell/exercises/run-length-encoding/README.md +4 -4
- data/tracks/haskell/exercises/saddle-points/README.md +1 -1
- data/tracks/haskell/exercises/scrabble-score/README.md +3 -1
- data/tracks/haskell/exercises/secret-handshake/README.md +1 -1
- data/tracks/haskell/exercises/sgf-parsing/README.md +4 -4
- data/tracks/haskell/exercises/simple-cipher/README.md +1 -1
- data/tracks/haskell/exercises/spiral-matrix/README.md +2 -2
- data/tracks/haskell/exercises/triangle/README.md +9 -6
- data/tracks/haskell/exercises/trinary/README.md +1 -1
- data/tracks/haskell/exercises/word-count/README.md +1 -2
- data/tracks/haskell/exercises/wordy/README.md +0 -5
- data/tracks/java/config.json +56 -9
- data/tracks/java/exercises/binary-search-tree/src/test/java/BSTTest.java +4 -4
- data/tracks/javascript/exercises/two-bucket/example.js +66 -69
- data/tracks/javascript/exercises/two-bucket/two-bucket.spec.js +18 -18
- data/tracks/julia/config.json +1 -0
- data/tracks/julia/docs/ABOUT.md +3 -8
- data/tracks/prolog/README.md +1 -1
- data/tracks/purescript/.travis.yml +1 -0
- data/tracks/purescript/README.md +9 -0
- data/tracks/purescript/bin/check-bower.sh +42 -0
- data/tracks/purescript/bin/test-separate.sh +46 -0
- data/tracks/python/README.md +2 -2
- data/tracks/python/exercises/all-your-base/all_your_base.py +2 -0
- data/tracks/python/exercises/atbash-cipher/atbash_cipher.py +2 -2
- data/tracks/python/exercises/complex-numbers/complex_numbers_test.py +2 -2
- data/tracks/python/exercises/complex-numbers/example.py +2 -2
- data/tracks/python/exercises/gigasecond/gigasecond.py +1 -1
- data/tracks/python/exercises/hamming/hamming.py +1 -1
- data/tracks/python/exercises/hexadecimal/hexadecimal.py +1 -1
- data/tracks/python/exercises/leap/leap.py +1 -1
- data/tracks/python/exercises/meetup/meetup.py +1 -1
- data/tracks/python/exercises/phone-number/example.py +4 -2
- data/tracks/python/exercises/phone-number/phone_number_test.py +47 -16
- data/tracks/python/exercises/pig-latin/pig_latin.py +1 -1
- data/tracks/python/exercises/scrabble-score/scrabble_score.py +1 -1
- data/tracks/python/exercises/wordy/wordy.py +1 -1
- data/tracks/scala/exercises/meetup/example.scala +29 -10
- data/tracks/scala/exercises/meetup/src/main/scala/Meetup.scala +23 -0
- data/tracks/scala/exercises/meetup/src/test/scala/MeetupTest.scala +273 -183
- data/tracks/sml/config.json +13 -0
- data/tracks/sml/exercises/anagram/README.md +21 -5
- data/tracks/sml/exercises/anagram/anagram.sml +2 -6
- data/tracks/sml/exercises/anagram/example.sml +29 -24
- data/tracks/sml/exercises/anagram/test.sml +56 -50
- data/tracks/sml/exercises/anagram/testlib.sml +159 -0
- data/tracks/sml/exercises/diamond/README.md +89 -0
- data/tracks/sml/exercises/diamond/diamond.sml +2 -0
- data/tracks/sml/exercises/diamond/example.sml +25 -0
- data/tracks/sml/exercises/diamond/test.sml +27 -0
- data/tracks/sml/exercises/diamond/testlib.sml +159 -0
- data/tracks/sml/exercises/raindrops/raindrops.sml +2 -2
- data/tracks/sml/exercises/raindrops/test.sml +66 -95
- data/tracks/sml/exercises/raindrops/testlib.sml +159 -0
- metadata +265 -3
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Generated by pub
|
|
2
|
+
# See http://pub.dartlang.org/doc/glossary.html#lockfile
|
|
3
|
+
packages:
|
|
4
|
+
analyzer:
|
|
5
|
+
description:
|
|
6
|
+
name: analyzer
|
|
7
|
+
url: "https://pub.dartlang.org"
|
|
8
|
+
source: hosted
|
|
9
|
+
version: "0.30.0+4"
|
|
10
|
+
args:
|
|
11
|
+
description:
|
|
12
|
+
name: args
|
|
13
|
+
url: "https://pub.dartlang.org"
|
|
14
|
+
source: hosted
|
|
15
|
+
version: "1.0.0"
|
|
16
|
+
async:
|
|
17
|
+
description:
|
|
18
|
+
name: async
|
|
19
|
+
url: "https://pub.dartlang.org"
|
|
20
|
+
source: hosted
|
|
21
|
+
version: "1.13.3"
|
|
22
|
+
barback:
|
|
23
|
+
description:
|
|
24
|
+
name: barback
|
|
25
|
+
url: "https://pub.dartlang.org"
|
|
26
|
+
source: hosted
|
|
27
|
+
version: "0.15.2+12"
|
|
28
|
+
boolean_selector:
|
|
29
|
+
description:
|
|
30
|
+
name: boolean_selector
|
|
31
|
+
url: "https://pub.dartlang.org"
|
|
32
|
+
source: hosted
|
|
33
|
+
version: "1.0.2"
|
|
34
|
+
charcode:
|
|
35
|
+
description:
|
|
36
|
+
name: charcode
|
|
37
|
+
url: "https://pub.dartlang.org"
|
|
38
|
+
source: hosted
|
|
39
|
+
version: "1.1.1"
|
|
40
|
+
cli_util:
|
|
41
|
+
description:
|
|
42
|
+
name: cli_util
|
|
43
|
+
url: "https://pub.dartlang.org"
|
|
44
|
+
source: hosted
|
|
45
|
+
version: "0.1.2+1"
|
|
46
|
+
collection:
|
|
47
|
+
description:
|
|
48
|
+
name: collection
|
|
49
|
+
url: "https://pub.dartlang.org"
|
|
50
|
+
source: hosted
|
|
51
|
+
version: "1.14.3"
|
|
52
|
+
convert:
|
|
53
|
+
description:
|
|
54
|
+
name: convert
|
|
55
|
+
url: "https://pub.dartlang.org"
|
|
56
|
+
source: hosted
|
|
57
|
+
version: "2.0.1"
|
|
58
|
+
crypto:
|
|
59
|
+
description:
|
|
60
|
+
name: crypto
|
|
61
|
+
url: "https://pub.dartlang.org"
|
|
62
|
+
source: hosted
|
|
63
|
+
version: "2.0.2+1"
|
|
64
|
+
csslib:
|
|
65
|
+
description:
|
|
66
|
+
name: csslib
|
|
67
|
+
url: "https://pub.dartlang.org"
|
|
68
|
+
source: hosted
|
|
69
|
+
version: "0.14.1"
|
|
70
|
+
front_end:
|
|
71
|
+
description:
|
|
72
|
+
name: front_end
|
|
73
|
+
url: "https://pub.dartlang.org"
|
|
74
|
+
source: hosted
|
|
75
|
+
version: "0.1.0-alpha.4.1"
|
|
76
|
+
glob:
|
|
77
|
+
description:
|
|
78
|
+
name: glob
|
|
79
|
+
url: "https://pub.dartlang.org"
|
|
80
|
+
source: hosted
|
|
81
|
+
version: "1.1.5"
|
|
82
|
+
html:
|
|
83
|
+
description:
|
|
84
|
+
name: html
|
|
85
|
+
url: "https://pub.dartlang.org"
|
|
86
|
+
source: hosted
|
|
87
|
+
version: "0.13.2"
|
|
88
|
+
http:
|
|
89
|
+
description:
|
|
90
|
+
name: http
|
|
91
|
+
url: "https://pub.dartlang.org"
|
|
92
|
+
source: hosted
|
|
93
|
+
version: "0.11.3+15"
|
|
94
|
+
http_multi_server:
|
|
95
|
+
description:
|
|
96
|
+
name: http_multi_server
|
|
97
|
+
url: "https://pub.dartlang.org"
|
|
98
|
+
source: hosted
|
|
99
|
+
version: "2.0.4"
|
|
100
|
+
http_parser:
|
|
101
|
+
description:
|
|
102
|
+
name: http_parser
|
|
103
|
+
url: "https://pub.dartlang.org"
|
|
104
|
+
source: hosted
|
|
105
|
+
version: "3.1.1"
|
|
106
|
+
isolate:
|
|
107
|
+
description:
|
|
108
|
+
name: isolate
|
|
109
|
+
url: "https://pub.dartlang.org"
|
|
110
|
+
source: hosted
|
|
111
|
+
version: "1.1.0"
|
|
112
|
+
kernel:
|
|
113
|
+
description:
|
|
114
|
+
name: kernel
|
|
115
|
+
url: "https://pub.dartlang.org"
|
|
116
|
+
source: hosted
|
|
117
|
+
version: "0.3.0-alpha.1.1"
|
|
118
|
+
logging:
|
|
119
|
+
description:
|
|
120
|
+
name: logging
|
|
121
|
+
url: "https://pub.dartlang.org"
|
|
122
|
+
source: hosted
|
|
123
|
+
version: "0.11.3+1"
|
|
124
|
+
matcher:
|
|
125
|
+
description:
|
|
126
|
+
name: matcher
|
|
127
|
+
url: "https://pub.dartlang.org"
|
|
128
|
+
source: hosted
|
|
129
|
+
version: "0.12.1+4"
|
|
130
|
+
meta:
|
|
131
|
+
description:
|
|
132
|
+
name: meta
|
|
133
|
+
url: "https://pub.dartlang.org"
|
|
134
|
+
source: hosted
|
|
135
|
+
version: "1.1.2"
|
|
136
|
+
mime:
|
|
137
|
+
description:
|
|
138
|
+
name: mime
|
|
139
|
+
url: "https://pub.dartlang.org"
|
|
140
|
+
source: hosted
|
|
141
|
+
version: "0.9.3"
|
|
142
|
+
package_config:
|
|
143
|
+
description:
|
|
144
|
+
name: package_config
|
|
145
|
+
url: "https://pub.dartlang.org"
|
|
146
|
+
source: hosted
|
|
147
|
+
version: "1.0.3"
|
|
148
|
+
package_resolver:
|
|
149
|
+
description:
|
|
150
|
+
name: package_resolver
|
|
151
|
+
url: "https://pub.dartlang.org"
|
|
152
|
+
source: hosted
|
|
153
|
+
version: "1.0.2"
|
|
154
|
+
path:
|
|
155
|
+
description:
|
|
156
|
+
name: path
|
|
157
|
+
url: "https://pub.dartlang.org"
|
|
158
|
+
source: hosted
|
|
159
|
+
version: "1.4.2"
|
|
160
|
+
plugin:
|
|
161
|
+
description:
|
|
162
|
+
name: plugin
|
|
163
|
+
url: "https://pub.dartlang.org"
|
|
164
|
+
source: hosted
|
|
165
|
+
version: "0.2.0+2"
|
|
166
|
+
pool:
|
|
167
|
+
description:
|
|
168
|
+
name: pool
|
|
169
|
+
url: "https://pub.dartlang.org"
|
|
170
|
+
source: hosted
|
|
171
|
+
version: "1.3.3"
|
|
172
|
+
pub_semver:
|
|
173
|
+
description:
|
|
174
|
+
name: pub_semver
|
|
175
|
+
url: "https://pub.dartlang.org"
|
|
176
|
+
source: hosted
|
|
177
|
+
version: "1.3.2"
|
|
178
|
+
shelf:
|
|
179
|
+
description:
|
|
180
|
+
name: shelf
|
|
181
|
+
url: "https://pub.dartlang.org"
|
|
182
|
+
source: hosted
|
|
183
|
+
version: "0.7.0"
|
|
184
|
+
shelf_packages_handler:
|
|
185
|
+
description:
|
|
186
|
+
name: shelf_packages_handler
|
|
187
|
+
url: "https://pub.dartlang.org"
|
|
188
|
+
source: hosted
|
|
189
|
+
version: "1.0.3"
|
|
190
|
+
shelf_static:
|
|
191
|
+
description:
|
|
192
|
+
name: shelf_static
|
|
193
|
+
url: "https://pub.dartlang.org"
|
|
194
|
+
source: hosted
|
|
195
|
+
version: "0.2.5"
|
|
196
|
+
shelf_web_socket:
|
|
197
|
+
description:
|
|
198
|
+
name: shelf_web_socket
|
|
199
|
+
url: "https://pub.dartlang.org"
|
|
200
|
+
source: hosted
|
|
201
|
+
version: "0.2.2"
|
|
202
|
+
source_map_stack_trace:
|
|
203
|
+
description:
|
|
204
|
+
name: source_map_stack_trace
|
|
205
|
+
url: "https://pub.dartlang.org"
|
|
206
|
+
source: hosted
|
|
207
|
+
version: "1.1.4"
|
|
208
|
+
source_maps:
|
|
209
|
+
description:
|
|
210
|
+
name: source_maps
|
|
211
|
+
url: "https://pub.dartlang.org"
|
|
212
|
+
source: hosted
|
|
213
|
+
version: "0.10.4"
|
|
214
|
+
source_span:
|
|
215
|
+
description:
|
|
216
|
+
name: source_span
|
|
217
|
+
url: "https://pub.dartlang.org"
|
|
218
|
+
source: hosted
|
|
219
|
+
version: "1.4.0"
|
|
220
|
+
stack_trace:
|
|
221
|
+
description:
|
|
222
|
+
name: stack_trace
|
|
223
|
+
url: "https://pub.dartlang.org"
|
|
224
|
+
source: hosted
|
|
225
|
+
version: "1.8.2"
|
|
226
|
+
stream_channel:
|
|
227
|
+
description:
|
|
228
|
+
name: stream_channel
|
|
229
|
+
url: "https://pub.dartlang.org"
|
|
230
|
+
source: hosted
|
|
231
|
+
version: "1.6.2"
|
|
232
|
+
string_scanner:
|
|
233
|
+
description:
|
|
234
|
+
name: string_scanner
|
|
235
|
+
url: "https://pub.dartlang.org"
|
|
236
|
+
source: hosted
|
|
237
|
+
version: "1.0.2"
|
|
238
|
+
term_glyph:
|
|
239
|
+
description:
|
|
240
|
+
name: term_glyph
|
|
241
|
+
url: "https://pub.dartlang.org"
|
|
242
|
+
source: hosted
|
|
243
|
+
version: "1.0.0"
|
|
244
|
+
test:
|
|
245
|
+
description:
|
|
246
|
+
name: test
|
|
247
|
+
url: "https://pub.dartlang.org"
|
|
248
|
+
source: hosted
|
|
249
|
+
version: "0.12.23+1"
|
|
250
|
+
typed_data:
|
|
251
|
+
description:
|
|
252
|
+
name: typed_data
|
|
253
|
+
url: "https://pub.dartlang.org"
|
|
254
|
+
source: hosted
|
|
255
|
+
version: "1.1.5"
|
|
256
|
+
utf:
|
|
257
|
+
description:
|
|
258
|
+
name: utf
|
|
259
|
+
url: "https://pub.dartlang.org"
|
|
260
|
+
source: hosted
|
|
261
|
+
version: "0.9.0+3"
|
|
262
|
+
watcher:
|
|
263
|
+
description:
|
|
264
|
+
name: watcher
|
|
265
|
+
url: "https://pub.dartlang.org"
|
|
266
|
+
source: hosted
|
|
267
|
+
version: "0.9.7+4"
|
|
268
|
+
web_socket_channel:
|
|
269
|
+
description:
|
|
270
|
+
name: web_socket_channel
|
|
271
|
+
url: "https://pub.dartlang.org"
|
|
272
|
+
source: hosted
|
|
273
|
+
version: "1.0.6"
|
|
274
|
+
yaml:
|
|
275
|
+
description:
|
|
276
|
+
name: yaml
|
|
277
|
+
url: "https://pub.dartlang.org"
|
|
278
|
+
source: hosted
|
|
279
|
+
version: "2.1.13"
|
|
280
|
+
sdks:
|
|
281
|
+
dart: ">=1.23.0 <2.0.0-dev.infinity"
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import "package:test/test.dart";
|
|
2
|
+
import "package:raindrops/raindrops.dart";
|
|
3
|
+
|
|
4
|
+
final raindrops = new Raindrops();
|
|
5
|
+
void main() {
|
|
6
|
+
group("identity tests", identityTests);
|
|
7
|
+
group("factor tests", factorTests);
|
|
8
|
+
group("multiple factor tests", multipleFactorTests);
|
|
9
|
+
group("edge case tests", edgeCaseTests);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
void identityTests() {
|
|
13
|
+
test("the sound for 1 is 1", () {
|
|
14
|
+
final String result = raindrops.convert(1);
|
|
15
|
+
expect(result, equals("1"));
|
|
16
|
+
}, skip: false);
|
|
17
|
+
test("the sound for 3 is Pling", () {
|
|
18
|
+
final String result = raindrops.convert(3);
|
|
19
|
+
expect(result, equals("Pling"));
|
|
20
|
+
}, skip: true);
|
|
21
|
+
test("the sound for 5 is Plang", () {
|
|
22
|
+
final String result = raindrops.convert(5);
|
|
23
|
+
expect(result, equals("Plang"));
|
|
24
|
+
}, skip: true);
|
|
25
|
+
test("the sound for 7 is Plong", () {
|
|
26
|
+
final String result = raindrops.convert(7);
|
|
27
|
+
expect(result, equals("Plong"));
|
|
28
|
+
}, skip: true);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
void factorTests() {
|
|
32
|
+
test("the sound for 6 is Pling as it has a factor 3", () {
|
|
33
|
+
final String result = raindrops.convert(6);
|
|
34
|
+
expect(result, equals("Pling"));
|
|
35
|
+
}, skip: true);
|
|
36
|
+
test("2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base", () {
|
|
37
|
+
final String result = raindrops.convert(8);
|
|
38
|
+
expect(result, equals("8"));
|
|
39
|
+
}, skip: true);
|
|
40
|
+
test("the sound for 9 is Pling as it has a factor 3", () {
|
|
41
|
+
final String result = raindrops.convert(9);
|
|
42
|
+
expect(result, equals("Pling"));
|
|
43
|
+
}, skip: true);
|
|
44
|
+
test("the sound for 10 is Plang as it has a factor 5", () {
|
|
45
|
+
final String result = raindrops.convert(10);
|
|
46
|
+
expect(result, equals("Plang"));
|
|
47
|
+
}, skip: true);
|
|
48
|
+
test("the sound for 14 is Plong as it has a factor of 7", () {
|
|
49
|
+
final String result = raindrops.convert(14);
|
|
50
|
+
expect(result, equals("Plong"));
|
|
51
|
+
}, skip: true);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
void multipleFactorTests() {
|
|
55
|
+
test("the sound for 15 is PlingPlang as it has factors 3 and 5", () {
|
|
56
|
+
final String result = raindrops.convert(15);
|
|
57
|
+
expect(result, equals("PlingPlang"));
|
|
58
|
+
}, skip: true);
|
|
59
|
+
test("the sound for 21 is PlingPlong as it has factors 3 and 7", () {
|
|
60
|
+
final String result = raindrops.convert(21);
|
|
61
|
+
expect(result, equals("PlingPlong"));
|
|
62
|
+
}, skip: true);
|
|
63
|
+
test("the sound for 35 is PlangPlong as it has factors 5 and 7", () {
|
|
64
|
+
final String result = raindrops.convert(35);
|
|
65
|
+
expect(result, equals("PlangPlong"));
|
|
66
|
+
}, skip: true);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
void edgeCaseTests() {
|
|
70
|
+
test("the sound for 25 is Plang as it has a factor 5", () {
|
|
71
|
+
final String result = raindrops.convert(25);
|
|
72
|
+
expect(result, equals("Plang"));
|
|
73
|
+
}, skip: true);
|
|
74
|
+
test("the sound for 27 is Pling as it has a factor 3", () {
|
|
75
|
+
final String result = raindrops.convert(27);
|
|
76
|
+
expect(result, equals("Pling"));
|
|
77
|
+
}, skip: true);
|
|
78
|
+
test("the sound for 49 is Plong as it has a factor 7", () {
|
|
79
|
+
final String result = raindrops.convert(49);
|
|
80
|
+
expect(result, equals("Plong"));
|
|
81
|
+
}, skip: true);
|
|
82
|
+
test("the sound for 52 is 52", () {
|
|
83
|
+
final String result = raindrops.convert(52);
|
|
84
|
+
expect(result, equals("52"));
|
|
85
|
+
}, skip: true);
|
|
86
|
+
test("the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7", () {
|
|
87
|
+
final String result = raindrops.convert(105);
|
|
88
|
+
expect(result, equals("PlingPlangPlong"));
|
|
89
|
+
}, skip: true);
|
|
90
|
+
test("the sound for 3125 is Plang as it has a factor 5", () {
|
|
91
|
+
final String result = raindrops.convert(3215);
|
|
92
|
+
expect(result, equals("Plang"));
|
|
93
|
+
}, skip: true);
|
|
94
|
+
}
|
|
@@ -5,7 +5,6 @@ interface
|
|
|
5
5
|
type
|
|
6
6
|
TPigLatin = class
|
|
7
7
|
private
|
|
8
|
-
class function WordOnlyHasYForAVowel(aWord: string): boolean;
|
|
9
8
|
class function WordStartsWithVowelLike(aWord: string): boolean;
|
|
10
9
|
class function WordStartsWithPrefixes(aWord: string; aPrefixes: array of string): boolean;
|
|
11
10
|
class function WordStartsWithConsonantAndQu(aWord: string): boolean;
|
|
@@ -37,21 +36,14 @@ begin
|
|
|
37
36
|
end;
|
|
38
37
|
|
|
39
38
|
class function TPigLatin.TranslateWord(aWord: string): string;
|
|
40
|
-
var splitWordAtY: TArray<string>;
|
|
41
39
|
begin
|
|
42
|
-
if WordOnlyHasYForAVowel(aWord) then
|
|
43
|
-
begin
|
|
44
|
-
splitWordAtY := aWord.Split(['y']);
|
|
45
|
-
result := 'y' + splitWordAtY[1] + splitWordAtY[0] + 'ay';
|
|
46
|
-
end
|
|
47
|
-
else
|
|
48
40
|
if WordStartsWithVowelLike(aWord) then
|
|
49
41
|
result := aWord + 'ay'
|
|
50
42
|
else
|
|
51
43
|
if WordStartsWithPrefixes(aWord, ['thr', 'sch']) then
|
|
52
44
|
result := aword.Substring(3) + aWord.Substring(0, 3) + 'ay'
|
|
53
45
|
else
|
|
54
|
-
if WordStartsWithPrefixes(aWord, ['ch', 'qu', 'th']) then
|
|
46
|
+
if WordStartsWithPrefixes(aWord, ['ch', 'qu', 'th', 'rh']) then
|
|
55
47
|
result := aWord.Substring(2) + aWord.Substring(0, 2) + 'ay'
|
|
56
48
|
else
|
|
57
49
|
if WordStartsWithConsonantAndQu(aWord) then
|
|
@@ -60,22 +52,6 @@ begin
|
|
|
60
52
|
result := aWord.Substring(1) + aWord[1] + 'ay';
|
|
61
53
|
end;
|
|
62
54
|
|
|
63
|
-
class function TPigLatin.WordOnlyHasYForAVowel(aWord: string): boolean;
|
|
64
|
-
var singleLetter: string;
|
|
65
|
-
begin
|
|
66
|
-
result := false;
|
|
67
|
-
for singleLetter in aWord do
|
|
68
|
-
begin
|
|
69
|
-
result := TRegex.IsMatch(singleLetter,'[aeiou]',[roIgnoreCase]);
|
|
70
|
-
if result then
|
|
71
|
-
break;
|
|
72
|
-
end;
|
|
73
|
-
if not result then
|
|
74
|
-
result := aWord.Contains('y')
|
|
75
|
-
else
|
|
76
|
-
result := false;
|
|
77
|
-
end;
|
|
78
|
-
|
|
79
55
|
class function TPigLatin.WordStartsWithConsonantAndQu(aWord: string): boolean;
|
|
80
56
|
begin
|
|
81
57
|
result := aWord.Substring(1).StartsWith('qu');
|
data/tracks/haskell/config.json
CHANGED
|
@@ -105,6 +105,15 @@
|
|
|
105
105
|
"topics": [
|
|
106
106
|
]
|
|
107
107
|
},
|
|
108
|
+
{
|
|
109
|
+
"uuid": "40d4aa74-6e4a-4579-810e-b4430bc172e8",
|
|
110
|
+
"slug": "diamond",
|
|
111
|
+
"core": false,
|
|
112
|
+
"unlocked_by": null,
|
|
113
|
+
"difficulty": 2,
|
|
114
|
+
"topics": [
|
|
115
|
+
]
|
|
116
|
+
},
|
|
108
117
|
{
|
|
109
118
|
"uuid": "197a543c-d9c7-41c3-814c-4b1ece3db568",
|
|
110
119
|
"slug": "grains",
|
|
@@ -6,6 +6,7 @@ Implement general base conversion. Given a number in base **a**,
|
|
|
6
6
|
represented as a sequence of digits, convert it to base **b**.
|
|
7
7
|
|
|
8
8
|
## Note
|
|
9
|
+
|
|
9
10
|
- Try to implement the conversion yourself.
|
|
10
11
|
Do not use something else to perform the conversion for you.
|
|
11
12
|
|
|
@@ -28,7 +29,6 @@ The number 1120, *in base 3*, means:
|
|
|
28
29
|
|
|
29
30
|
I think you got the idea!
|
|
30
31
|
|
|
31
|
-
|
|
32
32
|
*Yes. Those three numbers above are exactly the same. Congratulations!*
|
|
33
33
|
|
|
34
34
|
|
|
@@ -29,7 +29,6 @@ allergens that score 256, 512, 1024, etc.). Your program should
|
|
|
29
29
|
ignore those components of the score. For example, if the allergy
|
|
30
30
|
score is 257, your program should only report the eggs (1) allergy.
|
|
31
31
|
|
|
32
|
-
|
|
33
32
|
## Hints
|
|
34
33
|
|
|
35
34
|
To complete this exercise you need to to create the data type `Allergen`,
|
|
@@ -7,7 +7,7 @@ letters in words are replaced with numbers.
|
|
|
7
7
|
|
|
8
8
|
For example `SEND + MORE = MONEY`:
|
|
9
9
|
|
|
10
|
-
```
|
|
10
|
+
```text
|
|
11
11
|
S E N D
|
|
12
12
|
M O R E +
|
|
13
13
|
-----------
|
|
@@ -16,7 +16,7 @@ M O N E Y
|
|
|
16
16
|
|
|
17
17
|
Replacing these with valid numbers gives:
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```text
|
|
20
20
|
9 5 6 7
|
|
21
21
|
1 0 8 5 +
|
|
22
22
|
-----------
|
|
@@ -9,7 +9,7 @@ letter, the second with the second-last, and so on.
|
|
|
9
9
|
|
|
10
10
|
An Atbash cipher for the Latin alphabet would be as follows:
|
|
11
11
|
|
|
12
|
-
```
|
|
12
|
+
```text
|
|
13
13
|
Plain: abcdefghijklmnopqrstuvwxyz
|
|
14
14
|
Cipher: zyxwvutsrqponmlkjihgfedcba
|
|
15
15
|
```
|
|
@@ -23,6 +23,7 @@ being 5 letters, and punctuation is excluded. This is to make it harder to guess
|
|
|
23
23
|
things based on word boundaries.
|
|
24
24
|
|
|
25
25
|
## Examples
|
|
26
|
+
|
|
26
27
|
- Encoding `test` gives `gvhg`
|
|
27
28
|
- Decoding `gvhg` gives `test`
|
|
28
29
|
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
|
|
@@ -4,7 +4,7 @@ Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles
|
|
|
4
4
|
|
|
5
5
|
Note that not all verses are identical.
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```text
|
|
8
8
|
99 bottles of beer on the wall, 99 bottles of beer.
|
|
9
9
|
Take one down and pass it around, 98 bottles of beer on the wall.
|
|
10
10
|
|
|
@@ -7,10 +7,12 @@ string, your program should produce a decimal output. The
|
|
|
7
7
|
program should handle invalid inputs.
|
|
8
8
|
|
|
9
9
|
## Note
|
|
10
|
+
|
|
10
11
|
- Implement the conversion yourself.
|
|
11
12
|
Do not use something else to perform the conversion for you.
|
|
12
13
|
|
|
13
14
|
## About Binary (Base-2)
|
|
15
|
+
|
|
14
16
|
Decimal is a base-10 system.
|
|
15
17
|
|
|
16
18
|
A number 23 in base 10 notation can be understood
|
|
@@ -2,19 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Score a bowling game.
|
|
4
4
|
|
|
5
|
-
Bowling is game where players roll a heavy ball to knock down pins
|
|
5
|
+
Bowling is a game where players roll a heavy ball to knock down pins
|
|
6
6
|
arranged in a triangle. Write code to keep track of the score
|
|
7
7
|
of a game of bowling.
|
|
8
8
|
|
|
9
9
|
## Scoring Bowling
|
|
10
10
|
|
|
11
|
-
The game consists of 10 frames. A frame is composed of one or two ball
|
|
11
|
+
The game consists of 10 frames. A frame is composed of one or two ball
|
|
12
|
+
throws with 10 pins standing at frame initialization. There are three
|
|
13
|
+
cases for the tabulation of a frame.
|
|
12
14
|
|
|
13
|
-
* An open frame is where a score of less than 10 is recorded for the
|
|
15
|
+
* An open frame is where a score of less than 10 is recorded for the
|
|
16
|
+
frame. In this case the score for the frame is the number of pins
|
|
17
|
+
knocked down.
|
|
14
18
|
|
|
15
|
-
* A spare is where all ten pins are knocked down
|
|
19
|
+
* A spare is where all ten pins are knocked down by the second
|
|
20
|
+
throw. The total value of a spare is 10 plus the number of pins
|
|
21
|
+
knocked down in their next throw.
|
|
16
22
|
|
|
17
|
-
* A strike is where all ten pins are knocked down
|
|
23
|
+
* A strike is where all ten pins are knocked down by the first
|
|
24
|
+
throw. The total value of a strike is 10 plus the number of pins
|
|
25
|
+
knocked down in the next two throws. If a strike is immediately
|
|
26
|
+
followed by a second strike, then the value of the first strike
|
|
27
|
+
cannot be determined until the ball is thrown one more time.
|
|
18
28
|
|
|
19
29
|
Here is a three frame example:
|
|
20
30
|
|
|
@@ -30,7 +40,11 @@ Frame 3 is (9 + 0) = 9
|
|
|
30
40
|
|
|
31
41
|
This means the current running total is 48.
|
|
32
42
|
|
|
33
|
-
The tenth frame in the game is a special case. If someone throws a
|
|
43
|
+
The tenth frame in the game is a special case. If someone throws a
|
|
44
|
+
strike or a spare then they get a fill ball. Fill balls exist to
|
|
45
|
+
calculate the total of the 10th frame. Scoring a strike or spare on
|
|
46
|
+
the fill ball does not give the player more fill balls. The total
|
|
47
|
+
value of the 10th frame is the total number of pins knocked down.
|
|
34
48
|
|
|
35
49
|
For a tenth frame of X1/ (strike and a spare), the total value is 20.
|
|
36
50
|
|
|
@@ -10,6 +10,7 @@ always reach 1 eventually.
|
|
|
10
10
|
Given a number n, return the number of steps required to reach 1.
|
|
11
11
|
|
|
12
12
|
## Examples
|
|
13
|
+
|
|
13
14
|
Starting with n = 12, the steps would be as follows:
|
|
14
15
|
|
|
15
16
|
0. 12
|
|
@@ -26,7 +27,6 @@ Starting with n = 12, the steps would be as follows:
|
|
|
26
27
|
Resulting in 9 steps. So for input n = 12, the return value would be 9.
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
|
|
30
30
|
## Getting Started
|
|
31
31
|
|
|
32
32
|
For installation and learning resources, refer to the
|
|
@@ -18,7 +18,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair".
|
|
|
18
18
|
The boards look like this (with spaces added for readability, which won't be in
|
|
19
19
|
the representation passed to your code):
|
|
20
20
|
|
|
21
|
-
```
|
|
21
|
+
```text
|
|
22
22
|
. O . X .
|
|
23
23
|
. X X O .
|
|
24
24
|
O O O X .
|
|
@@ -26,7 +26,7 @@ and `r` is the number of rows.
|
|
|
26
26
|
Our normalized text is 54 characters long, dictating a rectangle with
|
|
27
27
|
`c = 8` and `r = 7`:
|
|
28
28
|
|
|
29
|
-
```
|
|
29
|
+
```text
|
|
30
30
|
ifmanwas
|
|
31
31
|
meanttos
|
|
32
32
|
tayonthe
|
|
@@ -41,7 +41,7 @@ right.
|
|
|
41
41
|
|
|
42
42
|
The message above is coded as:
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```text
|
|
45
45
|
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -49,14 +49,14 @@ Output the encoded text in chunks. Phrases that fill perfect squares
|
|
|
49
49
|
`(r X r)` should be output in `r`-length chunks separated by spaces.
|
|
50
50
|
Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows.
|
|
51
51
|
|
|
52
|
-
```
|
|
52
|
+
```text
|
|
53
53
|
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Notice that were we to stack these, we could visually decode the
|
|
57
57
|
cyphertext back in to the original message:
|
|
58
58
|
|
|
59
|
-
```
|
|
59
|
+
```text
|
|
60
60
|
imtgdvs
|
|
61
61
|
fearwer
|
|
62
62
|
mayoogo
|