trackler 2.2.1.151 → 2.2.1.152
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/hamming/description.md +4 -3
- data/problem-specifications/exercises/isbn-verifier/canonical-data.json +9 -1
- data/tracks/clojure/exercises/bob/README.md +2 -0
- data/tracks/clojure/exercises/bob/src/example.clj +4 -0
- data/tracks/clojure/exercises/bob/test/bob_test.clj +1 -1
- data/tracks/clojure/exercises/say/README.md +2 -1
- data/tracks/csharp/exercises/acronym/AcronymTest.cs +3 -9
- data/tracks/csharp/exercises/all-your-base/AllYourBaseTest.cs +43 -43
- data/tracks/csharp/exercises/allergies/AllergiesTest.cs +1 -1
- data/tracks/csharp/exercises/alphametics/AlphameticsTest.cs +21 -1
- data/tracks/csharp/exercises/anagram/AnagramTest.cs +1 -35
- data/tracks/csharp/exercises/atbash-cipher/AtbashCipherTest.cs +1 -1
- data/tracks/csharp/exercises/beer-song/BeerSong.cs +1 -6
- data/tracks/csharp/exercises/beer-song/BeerSongTest.cs +20 -28
- data/tracks/csharp/exercises/beer-song/Example.cs +6 -6
- data/tracks/csharp/exercises/binary-search/BinarySearchTest.cs +1 -1
- data/tracks/csharp/exercises/bob/BobTest.cs +1 -1
- data/tracks/csharp/exercises/book-store/BookStoreTest.cs +1 -1
- data/tracks/csharp/exercises/bowling/BowlingTest.cs +47 -29
- data/tracks/csharp/exercises/bracket-push/BracketPushTest.cs +36 -29
- data/tracks/csharp/exercises/change/Change.cs +1 -1
- data/tracks/csharp/exercises/change/ChangeTest.cs +48 -21
- data/tracks/csharp/exercises/change/Example.cs +31 -18
- data/tracks/csharp/exercises/circular-buffer/CircularBuffer.cs +2 -2
- data/tracks/csharp/exercises/circular-buffer/CircularBufferTest.cs +88 -111
- data/tracks/csharp/exercises/circular-buffer/Example.cs +7 -7
- data/tracks/csharp/exercises/clock/ClockTest.cs +37 -37
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs +1 -1
- data/tracks/csharp/exercises/complex-numbers/ComplexNumbersTest.cs +19 -10
- data/tracks/csharp/exercises/connect/ConnectTest.cs +1 -1
- data/tracks/csharp/exercises/crypto-square/CryptoSquareTest.cs +1 -1
- data/tracks/csharp/exercises/custom-set/.meta/hints.md +3 -3
- data/tracks/csharp/exercises/custom-set/CustomSet.cs +10 -49
- data/tracks/csharp/exercises/custom-set/CustomSetTest.cs +153 -157
- data/tracks/csharp/exercises/custom-set/Example.cs +26 -54
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs +1 -1
- data/tracks/csharp/exercises/dominoes/DominoesTest.cs +25 -25
- data/tracks/csharp/exercises/etl/Etl.cs +1 -1
- data/tracks/csharp/exercises/etl/EtlTest.cs +4 -4
- data/tracks/csharp/exercises/etl/Example.cs +1 -1
- data/tracks/csharp/exercises/flatten-array/FlattenArrayTest.cs +13 -13
- data/tracks/csharp/exercises/food-chain/Example.cs +5 -0
- data/tracks/csharp/exercises/food-chain/FoodChain.cs +5 -0
- data/tracks/csharp/exercises/food-chain/FoodChainTest.cs +9 -9
- data/tracks/csharp/exercises/forth/Example.cs +28 -33
- data/tracks/csharp/exercises/forth/Forth.cs +1 -19
- data/tracks/csharp/exercises/forth/ForthTest.cs +215 -52
- data/tracks/csharp/exercises/gigasecond/GigasecondTest.cs +1 -1
- data/tracks/csharp/exercises/grains/GrainsTest.cs +1 -1
- data/tracks/csharp/exercises/grep/Example.cs +1 -1
- data/tracks/csharp/exercises/grep/Grep.cs +1 -1
- data/tracks/csharp/exercises/grep/GrepTest.cs +268 -237
- data/tracks/csharp/exercises/hamming/HammingTest.cs +1 -1
- data/tracks/csharp/exercises/hello-world/HelloWorldTest.cs +1 -1
- data/tracks/csharp/exercises/house/Example.cs +7 -2
- data/tracks/csharp/exercises/house/House.cs +5 -0
- data/tracks/csharp/exercises/house/HouseTest.cs +40 -223
- data/tracks/csharp/exercises/isbn-verifier/IsbnVerifierTest.cs +14 -2
- data/tracks/csharp/exercises/isogram/IsogramTest.cs +1 -1
- data/tracks/csharp/exercises/kindergarten-garden/KindergartenGardenTest.cs +1 -1
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProductTest.cs +1 -1
- data/tracks/csharp/exercises/leap/LeapTest.cs +1 -1
- data/tracks/csharp/exercises/luhn/LuhnTest.cs +1 -1
- data/tracks/csharp/exercises/markdown/MarkdownTest.cs +34 -27
- data/tracks/csharp/exercises/minesweeper/MinesweeperTest.cs +29 -34
- data/tracks/csharp/exercises/nth-prime/NthPrimeTest.cs +1 -1
- data/tracks/csharp/exercises/nucleotide-count/NucleotideCountTest.cs +1 -1
- data/tracks/csharp/exercises/ocr-numbers/OcrNumbersTest.cs +35 -35
- data/tracks/csharp/exercises/pangram/PangramTest.cs +1 -1
- data/tracks/csharp/exercises/pascals-triangle/PascalsTriangleTest.cs +1 -1
- data/tracks/csharp/exercises/perfect-numbers/PerfectNumbersTest.cs +1 -1
- data/tracks/csharp/exercises/phone-number/PhoneNumberTest.cs +17 -3
- data/tracks/csharp/exercises/pig-latin/PigLatinTest.cs +1 -1
- data/tracks/csharp/exercises/poker/PokerTest.cs +1 -1
- data/tracks/csharp/exercises/prime-factors/PrimeFactorsTest.cs +1 -1
- data/tracks/csharp/exercises/protein-translation/Example.cs +4 -4
- data/tracks/csharp/exercises/protein-translation/ProteinTranslation.cs +1 -1
- data/tracks/csharp/exercises/protein-translation/ProteinTranslationTest.cs +104 -45
- data/tracks/csharp/exercises/proverb/ProverbTest.cs +38 -6
- data/tracks/csharp/exercises/queen-attack/QueenAttackTest.cs +1 -1
- data/tracks/csharp/exercises/rail-fence-cipher/RailFenceCipherTest.cs +1 -1
- data/tracks/csharp/exercises/raindrops/RaindropsTest.cs +1 -1
- data/tracks/csharp/exercises/rectangles/RectanglesTest.cs +63 -21
- data/tracks/csharp/exercises/reverse-string/ReverseStringTest.cs +1 -1
- data/tracks/csharp/exercises/rna-transcription/RnaTranscriptionTest.cs +1 -1
- data/tracks/csharp/exercises/roman-numerals/RomanNumeralsTest.cs +7 -1
- data/tracks/csharp/exercises/rotational-cipher/RotationalCipherTest.cs +1 -1
- data/tracks/csharp/exercises/run-length-encoding/RunLengthEncodingTest.cs +1 -1
- data/tracks/csharp/exercises/saddle-points/SaddlePointsTest.cs +11 -11
- data/tracks/csharp/exercises/say/SayTest.cs +1 -1
- data/tracks/csharp/exercises/scale-generator/Example.cs +5 -0
- data/tracks/csharp/exercises/scale-generator/ScaleGenerator.cs +5 -0
- data/tracks/csharp/exercises/scale-generator/ScaleGeneratorTest.cs +56 -47
- data/tracks/csharp/exercises/scrabble-score/ScrabbleScoreTest.cs +1 -1
- data/tracks/csharp/exercises/secret-handshake/SecretHandshakeTest.cs +1 -1
- data/tracks/csharp/exercises/sieve/SieveTest.cs +1 -1
- data/tracks/csharp/exercises/space-age/SpaceAgeTest.cs +1 -1
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs +28 -34
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +1 -1
- data/tracks/csharp/exercises/tournament/Example.cs +15 -7
- data/tracks/csharp/exercises/tournament/TournamentTest.cs +97 -99
- data/tracks/csharp/exercises/transpose/TransposeTest.cs +50 -96
- data/tracks/csharp/exercises/triangle/TriangleTest.cs +1 -1
- data/tracks/csharp/exercises/twelve-days/TwelveDays.cs +1 -1
- data/tracks/csharp/exercises/two-bucket/TwoBucketTest.cs +1 -1
- data/tracks/csharp/exercises/two-fer/TwoFerTest.cs +1 -1
- data/tracks/csharp/exercises/variable-length-quantity/Example.cs +3 -3
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantity.cs +2 -2
- data/tracks/csharp/exercises/variable-length-quantity/VariableLengthQuantityTest.cs +165 -40
- data/tracks/csharp/exercises/word-count/Example.cs +1 -1
- data/tracks/csharp/exercises/word-count/WordCount.cs +1 -1
- data/tracks/csharp/exercises/word-count/WordCountTest.cs +12 -12
- data/tracks/csharp/exercises/wordy/WordyTest.cs +1 -1
- data/tracks/csharp/exercises/yacht/Example.cs +2 -5
- data/tracks/csharp/exercises/yacht/YachtTest.cs +7 -1
- data/tracks/csharp/exercises/zebra-puzzle/Example.cs +4 -4
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzle.cs +2 -2
- data/tracks/csharp/exercises/zebra-puzzle/ZebraPuzzleTest.cs +7 -5
- data/tracks/csharp/generators/Exercises/AllYourBase.cs +1 -0
- data/tracks/csharp/generators/Exercises/Alphametics.cs +5 -2
- data/tracks/csharp/generators/Exercises/BeerSong.cs +3 -0
- data/tracks/csharp/generators/Exercises/BinarySearch.cs +1 -0
- data/tracks/csharp/generators/Exercises/BookStore.cs +2 -0
- data/tracks/csharp/generators/Exercises/Bowling.cs +20 -15
- data/tracks/csharp/generators/Exercises/BracketPush.cs +1 -1
- data/tracks/csharp/generators/Exercises/Change.cs +20 -0
- data/tracks/csharp/generators/Exercises/CircularBuffer.cs +74 -0
- data/tracks/csharp/generators/Exercises/Clock.cs +7 -8
- data/tracks/csharp/generators/Exercises/ComplexNumbers.cs +9 -16
- data/tracks/csharp/generators/Exercises/Connect.cs +6 -6
- data/tracks/csharp/generators/Exercises/CustomSet.cs +56 -0
- data/tracks/csharp/generators/Exercises/Dominoes.cs +2 -2
- data/tracks/csharp/generators/Exercises/Etl.cs +7 -35
- data/tracks/csharp/generators/Exercises/FlattenArray.cs +9 -13
- data/tracks/csharp/generators/Exercises/FoodChain.cs +5 -0
- data/tracks/csharp/generators/Exercises/Forth.cs +25 -0
- data/tracks/csharp/generators/Exercises/Gigasecond.cs +4 -4
- data/tracks/csharp/generators/Exercises/Grains.cs +1 -1
- data/tracks/csharp/generators/Exercises/Grep.cs +106 -0
- data/tracks/csharp/generators/Exercises/Hamming.cs +1 -1
- data/tracks/csharp/generators/Exercises/House.cs +5 -0
- data/tracks/csharp/generators/Exercises/KindergartenGarden.cs +3 -3
- data/tracks/csharp/generators/Exercises/Markdown.cs +25 -0
- data/tracks/csharp/generators/Exercises/Meetup.cs +6 -6
- data/tracks/csharp/generators/Exercises/Minesweeper.cs +14 -4
- data/tracks/csharp/generators/Exercises/OcrNumbers.cs +12 -3
- data/tracks/csharp/generators/Exercises/PascalsTriangle.cs +0 -7
- data/tracks/csharp/generators/Exercises/ProteinTranslation.cs +8 -0
- data/tracks/csharp/generators/Exercises/Proverb.cs +7 -5
- data/tracks/csharp/generators/Exercises/QueenAttack.cs +3 -3
- data/tracks/csharp/generators/Exercises/Rectangles.cs +17 -0
- data/tracks/csharp/generators/Exercises/RobotSimulator.cs +6 -6
- data/tracks/csharp/generators/Exercises/SaddlePoints.cs +2 -2
- data/tracks/csharp/generators/Exercises/Say.cs +1 -1
- data/tracks/csharp/generators/Exercises/ScaleGenerator.cs +15 -0
- data/tracks/csharp/generators/Exercises/SpiralMatrix.cs +45 -0
- data/tracks/csharp/generators/Exercises/Sublist.cs +4 -5
- data/tracks/csharp/generators/Exercises/SumOfMultiples.cs +10 -1
- data/tracks/csharp/generators/Exercises/Tournament.cs +11 -19
- data/tracks/csharp/generators/Exercises/Transpose.cs +2 -2
- data/tracks/csharp/generators/Exercises/Triangle.cs +1 -3
- data/tracks/csharp/generators/Exercises/TwelveDays.cs +3 -4
- data/tracks/csharp/generators/Exercises/TwoBucket.cs +5 -5
- data/tracks/csharp/generators/Exercises/TwoFer.cs +11 -2
- data/tracks/csharp/generators/Exercises/VariableLengthQuantity.cs +44 -0
- data/tracks/csharp/generators/Exercises/Yacht.cs +11 -10
- data/tracks/csharp/generators/Exercises/ZebraPuzzle.cs +19 -0
- data/tracks/csharp/generators/GeneratorExercise.cs +6 -6
- data/tracks/csharp/generators/Input/CanonicalData.cs +6 -9
- data/tracks/csharp/generators/Input/CanonicalDataCase.cs +13 -46
- data/tracks/csharp/generators/Input/CanonicalDataCaseParser.cs +170 -0
- data/tracks/csharp/generators/Input/CanonicalDataFile.cs +1 -2
- data/tracks/csharp/generators/Input/CanonicalDataParser.cs +16 -12
- data/tracks/csharp/generators/Input/ConfigFile.cs +0 -5
- data/tracks/csharp/generators/Input/ConvertHelper.cs +20 -0
- data/tracks/csharp/generators/Output/Templates/_TestClassDisposable.liquid +14 -0
- data/tracks/csharp/generators/Output/TestMethodBodyData.cs +11 -14
- data/tracks/csharp/generators/Output/ValueFormatter.cs +20 -7
- data/tracks/delphi/config.json +22 -0
- data/tracks/delphi/exercises/grade-school/GradeSchool.dpr +60 -0
- data/tracks/delphi/exercises/grade-school/README.md +62 -0
- data/tracks/delphi/exercises/grade-school/uGradeSchoolExample.pas +134 -0
- data/tracks/delphi/exercises/grade-school/uGradeSchoolTest.pas +150 -0
- data/tracks/delphi/exercises/hamming/README.md +4 -3
- data/tracks/delphi/exercises/proverb/Proverb.dpr +60 -0
- data/tracks/delphi/exercises/proverb/README.md +44 -0
- data/tracks/delphi/exercises/proverb/uProverbExample.pas +60 -0
- data/tracks/delphi/exercises/proverb/uProverbTests.pas +124 -0
- data/tracks/go/exercises/bracket-push/README.md +3 -2
- data/tracks/go/exercises/bracket-push/cases_test.go +7 -2
- data/tracks/go/exercises/isbn-verifier/cases_test.go +4 -3
- data/tracks/go/exercises/yacht/cases_test.go +8 -2
- data/tracks/java/exercises/armstrong-numbers/README.md +1 -1
- data/tracks/java/exercises/binary-search-tree/src/test/java/BinarySearchTreeTest.java +22 -22
- data/tracks/java/exercises/bracket-push/README.md +3 -2
- data/tracks/java/exercises/crypto-square/README.md +23 -19
- data/tracks/java/exercises/grade-school/src/test/java/SchoolTest.java +1 -1
- data/tracks/java/exercises/poker/.meta/{version.txt → version} +0 -0
- data/tracks/java/exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java +7 -7
- data/tracks/java/exercises/rail-fence-cipher/.meta/version +1 -0
- data/tracks/java/exercises/robot-simulator/src/test/java/RobotTest.java +45 -45
- data/tracks/nim/config.json +24 -0
- data/tracks/nim/exercises/armstrong-numbers/README.md +18 -0
- data/tracks/nim/exercises/armstrong-numbers/armstrong_number_test.nim +29 -0
- data/tracks/nim/exercises/armstrong-numbers/example.nim +11 -0
- data/tracks/nim/exercises/leap/leap_test.nim +12 -10
- data/tracks/nim/exercises/two-fer/README.md +19 -0
- data/tracks/nim/exercises/two-fer/example.nim +3 -0
- data/tracks/nim/exercises/two-fer/two_fer_test.nim +16 -0
- data/tracks/python/.travis.yml +0 -1
- data/tracks/python/README.md +1 -1
- data/tracks/python/config/exercise_readme.go.tmpl +1 -1
- data/tracks/python/docs/INSTALLATION.md +1 -1
- data/tracks/python/exercises/accumulate/README.md +1 -1
- data/tracks/python/exercises/acronym/README.md +1 -1
- data/tracks/python/exercises/all-your-base/README.md +1 -1
- data/tracks/python/exercises/allergies/README.md +1 -1
- data/tracks/python/exercises/alphametics/README.md +1 -1
- data/tracks/python/exercises/anagram/README.md +1 -1
- data/tracks/python/exercises/armstrong-numbers/README.md +2 -2
- data/tracks/python/exercises/atbash-cipher/README.md +1 -1
- data/tracks/python/exercises/bank-account/README.md +1 -1
- data/tracks/python/exercises/beer-song/README.md +1 -1
- data/tracks/python/exercises/binary-search-tree/README.md +1 -1
- data/tracks/python/exercises/binary-search/README.md +1 -1
- data/tracks/python/exercises/binary/README.md +1 -1
- data/tracks/python/exercises/bob/README.md +1 -1
- data/tracks/python/exercises/book-store/README.md +1 -1
- data/tracks/python/exercises/bowling/README.md +1 -1
- data/tracks/python/exercises/bracket-push/README.md +4 -3
- data/tracks/python/exercises/change/README.md +1 -1
- data/tracks/python/exercises/circular-buffer/README.md +1 -1
- data/tracks/python/exercises/clock/README.md +1 -1
- data/tracks/python/exercises/collatz-conjecture/README.md +1 -1
- data/tracks/python/exercises/complex-numbers/README.md +1 -1
- data/tracks/python/exercises/connect/README.md +1 -1
- data/tracks/python/exercises/crypto-square/README.md +1 -1
- data/tracks/python/exercises/custom-set/README.md +1 -1
- data/tracks/python/exercises/diamond/README.md +1 -1
- data/tracks/python/exercises/difference-of-squares/README.md +1 -1
- data/tracks/python/exercises/diffie-hellman/README.md +1 -1
- data/tracks/python/exercises/dominoes/README.md +1 -1
- data/tracks/python/exercises/dot-dsl/README.md +1 -1
- data/tracks/python/exercises/error-handling/README.md +1 -1
- data/tracks/python/exercises/etl/README.md +1 -1
- data/tracks/python/exercises/flatten-array/README.md +1 -1
- data/tracks/python/exercises/food-chain/README.md +1 -1
- data/tracks/python/exercises/forth/README.md +1 -1
- data/tracks/python/exercises/gigasecond/README.md +1 -1
- data/tracks/python/exercises/go-counting/README.md +1 -1
- data/tracks/python/exercises/grade-school/README.md +1 -1
- data/tracks/python/exercises/grains/README.md +1 -1
- data/tracks/python/exercises/grep/README.md +1 -1
- data/tracks/python/exercises/hamming/README.md +1 -1
- data/tracks/python/exercises/hello-world/README.md +1 -1
- data/tracks/python/exercises/hexadecimal/README.md +1 -1
- data/tracks/python/exercises/house/README.md +1 -1
- data/tracks/python/exercises/isbn-verifier/README.md +1 -1
- data/tracks/python/exercises/isogram/README.md +1 -1
- data/tracks/python/exercises/kindergarten-garden/README.md +1 -1
- data/tracks/python/exercises/largest-series-product/README.md +1 -1
- data/tracks/python/exercises/leap/README.md +1 -1
- data/tracks/python/exercises/linked-list/README.md +1 -1
- data/tracks/python/exercises/list-ops/README.md +1 -1
- data/tracks/python/exercises/luhn/README.md +1 -1
- data/tracks/python/exercises/markdown/README.md +1 -1
- data/tracks/python/exercises/matrix/README.md +1 -1
- data/tracks/python/exercises/meetup/README.md +1 -1
- data/tracks/python/exercises/minesweeper/README.md +1 -1
- data/tracks/python/exercises/nth-prime/README.md +1 -1
- data/tracks/python/exercises/nucleotide-count/README.md +1 -1
- data/tracks/python/exercises/ocr-numbers/README.md +1 -1
- data/tracks/python/exercises/octal/README.md +1 -1
- data/tracks/python/exercises/palindrome-products/README.md +1 -1
- data/tracks/python/exercises/pangram/README.md +1 -1
- data/tracks/python/exercises/parallel-letter-frequency/README.md +1 -1
- data/tracks/python/exercises/pascals-triangle/README.md +1 -1
- data/tracks/python/exercises/perfect-numbers/README.md +1 -1
- data/tracks/python/exercises/phone-number/README.md +1 -1
- data/tracks/python/exercises/pig-latin/README.md +1 -1
- data/tracks/python/exercises/point-mutations/README.md +1 -1
- data/tracks/python/exercises/poker/README.md +1 -1
- data/tracks/python/exercises/pov/README.md +1 -1
- data/tracks/python/exercises/prime-factors/README.md +1 -1
- data/tracks/python/exercises/protein-translation/README.md +1 -1
- data/tracks/python/exercises/proverb/README.md +1 -1
- data/tracks/python/exercises/pythagorean-triplet/README.md +1 -1
- data/tracks/python/exercises/queen-attack/README.md +1 -1
- data/tracks/python/exercises/rail-fence-cipher/README.md +1 -1
- data/tracks/python/exercises/raindrops/README.md +1 -1
- data/tracks/python/exercises/rational-numbers/README.md +1 -1
- data/tracks/python/exercises/react/README.md +1 -1
- data/tracks/python/exercises/rectangles/README.md +1 -1
- data/tracks/python/exercises/reverse-string/README.md +1 -1
- data/tracks/python/exercises/rna-transcription/README.md +1 -1
- data/tracks/python/exercises/robot-name/README.md +1 -1
- data/tracks/python/exercises/robot-simulator/README.md +1 -1
- data/tracks/python/exercises/roman-numerals/README.md +1 -1
- data/tracks/python/exercises/rotational-cipher/README.md +1 -1
- data/tracks/python/exercises/run-length-encoding/README.md +1 -1
- data/tracks/python/exercises/saddle-points/README.md +1 -1
- data/tracks/python/exercises/say/README.md +1 -1
- data/tracks/python/exercises/scale-generator/README.md +1 -1
- data/tracks/python/exercises/scrabble-score/README.md +1 -1
- data/tracks/python/exercises/secret-handshake/README.md +1 -1
- data/tracks/python/exercises/series/README.md +1 -1
- data/tracks/python/exercises/sgf-parsing/README.md +1 -1
- data/tracks/python/exercises/sieve/README.md +1 -1
- data/tracks/python/exercises/simple-cipher/README.md +1 -1
- data/tracks/python/exercises/simple-linked-list/README.md +1 -1
- data/tracks/python/exercises/space-age/README.md +1 -1
- data/tracks/python/exercises/spiral-matrix/README.md +1 -1
- data/tracks/python/exercises/strain/README.md +1 -1
- data/tracks/python/exercises/sublist/README.md +1 -1
- data/tracks/python/exercises/sum-of-multiples/README.md +1 -1
- data/tracks/python/exercises/tournament/README.md +1 -1
- data/tracks/python/exercises/transpose/README.md +1 -1
- data/tracks/python/exercises/tree-building/README.md +1 -1
- data/tracks/python/exercises/triangle/README.md +1 -1
- data/tracks/python/exercises/trinary/README.md +1 -1
- data/tracks/python/exercises/twelve-days/README.md +1 -1
- data/tracks/python/exercises/two-bucket/README.md +1 -1
- data/tracks/python/exercises/two-fer/README.md +1 -1
- data/tracks/python/exercises/variable-length-quantity/README.md +1 -1
- data/tracks/python/exercises/word-count/README.md +1 -1
- data/tracks/python/exercises/word-search/README.md +1 -1
- data/tracks/python/exercises/wordy/README.md +1 -1
- data/tracks/python/exercises/yacht/README.md +1 -1
- data/tracks/python/exercises/zebra-puzzle/README.md +1 -1
- data/tracks/python/exercises/zipper/README.md +1 -1
- data/tracks/python/requirements-travis.txt +1 -1
- data/tracks/swift/exercises/scale-generator/Tests/ScaleGeneratorTests/ScaleGeneratorTests.swift +1 -1
- metadata +32 -8
- data/tracks/csharp/generators/Input/CanonicalDataCaseJson.cs +0 -73
- data/tracks/csharp/generators/Input/CanonicalDataCaseJsonConverter.cs +0 -49
- data/tracks/csharp/generators/Input/CanonicalDataCasesJson.cs +0 -58
- data/tracks/csharp/generators/Input/CanonicalDataCasesJsonConverter.cs +0 -17
- data/tracks/java/exercises/go-counting/src/main/java/.keep +0 -0
@@ -1,75 +1,102 @@
|
|
1
|
-
|
1
|
+
// This file was auto-generated based on version 1.2.0 of the canonical data.
|
2
|
+
|
2
3
|
using Xunit;
|
4
|
+
using System;
|
3
5
|
|
4
6
|
public class ChangeTest
|
5
7
|
{
|
6
8
|
[Fact]
|
7
9
|
public void Single_coin_change()
|
8
10
|
{
|
9
|
-
var
|
11
|
+
var coins = new[] { 1, 5, 10, 25, 100 };
|
10
12
|
var target = 25;
|
11
13
|
var expected = new[] { 25 };
|
12
|
-
Assert.Equal(expected, Change.
|
14
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
13
15
|
}
|
14
16
|
|
15
17
|
[Fact(Skip = "Remove to run test")]
|
16
18
|
public void Multiple_coin_change()
|
17
19
|
{
|
18
|
-
var
|
20
|
+
var coins = new[] { 1, 5, 10, 25, 100 };
|
19
21
|
var target = 15;
|
20
22
|
var expected = new[] { 5, 10 };
|
21
|
-
Assert.Equal(expected, Change.
|
23
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
22
24
|
}
|
23
25
|
|
24
26
|
[Fact(Skip = "Remove to run test")]
|
25
|
-
public void
|
27
|
+
public void Change_with_lilliputian_coins()
|
26
28
|
{
|
27
|
-
var
|
29
|
+
var coins = new[] { 1, 4, 15, 20, 50 };
|
28
30
|
var target = 23;
|
29
31
|
var expected = new[] { 4, 4, 15 };
|
30
|
-
Assert.Equal(expected, Change.
|
32
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
31
33
|
}
|
32
34
|
|
33
35
|
[Fact(Skip = "Remove to run test")]
|
34
|
-
public void
|
36
|
+
public void Change_with_lower_elbonia_coins()
|
35
37
|
{
|
36
|
-
var
|
38
|
+
var coins = new[] { 1, 5, 10, 21, 25 };
|
37
39
|
var target = 63;
|
38
40
|
var expected = new[] { 21, 21, 21 };
|
39
|
-
Assert.Equal(expected, Change.
|
41
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
40
42
|
}
|
41
43
|
|
42
44
|
[Fact(Skip = "Remove to run test")]
|
43
45
|
public void Large_target_values()
|
44
46
|
{
|
45
|
-
var
|
47
|
+
var coins = new[] { 1, 2, 5, 10, 20, 50, 100 };
|
46
48
|
var target = 999;
|
47
49
|
var expected = new[] { 2, 2, 5, 20, 20, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
|
48
|
-
Assert.Equal(expected, Change.
|
50
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
51
|
+
}
|
52
|
+
|
53
|
+
[Fact(Skip = "Remove to run test")]
|
54
|
+
public void Possible_change_without_unit_coins_available()
|
55
|
+
{
|
56
|
+
var coins = new[] { 2, 5, 10, 20, 50 };
|
57
|
+
var target = 21;
|
58
|
+
var expected = new[] { 2, 2, 2, 5, 10 };
|
59
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
60
|
+
}
|
61
|
+
|
62
|
+
[Fact(Skip = "Remove to run test")]
|
63
|
+
public void Another_possible_change_without_unit_coins_available()
|
64
|
+
{
|
65
|
+
var coins = new[] { 4, 5 };
|
66
|
+
var target = 27;
|
67
|
+
var expected = new[] { 4, 4, 4, 5, 5, 5 };
|
68
|
+
Assert.Equal(expected, Change.FindFewestCoins(coins, target));
|
49
69
|
}
|
50
70
|
|
51
71
|
[Fact(Skip = "Remove to run test")]
|
52
72
|
public void No_coins_make_0_change()
|
53
73
|
{
|
54
|
-
var
|
74
|
+
var coins = new[] { 1, 5, 10, 21, 25 };
|
55
75
|
var target = 0;
|
56
|
-
|
57
|
-
Assert.Equal(expected, Change.Calculate(target, actual));
|
76
|
+
Assert.Empty(Change.FindFewestCoins(coins, target));
|
58
77
|
}
|
59
78
|
|
60
79
|
[Fact(Skip = "Remove to run test")]
|
61
80
|
public void Error_testing_for_change_smaller_than_the_smallest_of_coins()
|
62
81
|
{
|
63
|
-
var
|
82
|
+
var coins = new[] { 5, 10 };
|
64
83
|
var target = 3;
|
65
|
-
Assert.Throws<ArgumentException>(() => Change.
|
84
|
+
Assert.Throws<ArgumentException>(() => Change.FindFewestCoins(coins, target));
|
85
|
+
}
|
86
|
+
|
87
|
+
[Fact(Skip = "Remove to run test")]
|
88
|
+
public void Error_if_no_combination_can_add_up_to_target()
|
89
|
+
{
|
90
|
+
var coins = new[] { 5, 10 };
|
91
|
+
var target = 94;
|
92
|
+
Assert.Throws<ArgumentException>(() => Change.FindFewestCoins(coins, target));
|
66
93
|
}
|
67
94
|
|
68
95
|
[Fact(Skip = "Remove to run test")]
|
69
96
|
public void Cannot_find_negative_change_values()
|
70
97
|
{
|
71
|
-
var
|
98
|
+
var coins = new[] { 1, 2, 5 };
|
72
99
|
var target = -5;
|
73
|
-
Assert.Throws<ArgumentException>(() => Change.
|
100
|
+
Assert.Throws<ArgumentException>(() => Change.FindFewestCoins(coins, target));
|
74
101
|
}
|
75
|
-
}
|
102
|
+
}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
using System;
|
2
|
+
using System.Collections.Generic;
|
2
3
|
using System.Linq;
|
3
4
|
|
4
5
|
public static class Change
|
5
6
|
{
|
6
|
-
public static int[]
|
7
|
+
public static int[] FindFewestCoins(int[] coins, int target)
|
7
8
|
{
|
8
9
|
if (target < 0)
|
9
10
|
{
|
@@ -14,26 +15,38 @@ public static int[] Calculate(int target, int[] coins)
|
|
14
15
|
throw new ArgumentException("Target amount cannot be less than minimal coin value.");
|
15
16
|
}
|
16
17
|
|
17
|
-
var
|
18
|
-
minimalCoins[0] = new int[0];
|
19
|
-
|
20
|
-
for (var amount = 1; amount <= target; amount++)
|
18
|
+
var minimalCoinsMapSeed = new Dictionary<int, List<int>>
|
21
19
|
{
|
22
|
-
|
23
|
-
|
24
|
-
.OrderBy(c => c.Length)
|
25
|
-
.FirstOrDefault() ?? new int[0];
|
26
|
-
}
|
20
|
+
[0] = new List<int>(0)
|
21
|
+
};
|
27
22
|
|
28
|
-
|
29
|
-
|
23
|
+
var minimalCoinsMap = Enumerable.Range(1, target)
|
24
|
+
.Aggregate(minimalCoinsMapSeed, UpdateMinimalCoinsMap);
|
30
25
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
26
|
+
if (minimalCoinsMap.TryGetValue(target, out var minimalCoins))
|
27
|
+
return minimalCoins.OrderBy(x => x).ToArray();
|
28
|
+
|
29
|
+
throw new ArgumentException();
|
30
|
+
|
31
|
+
Dictionary<int, List<int>> UpdateMinimalCoinsMap(Dictionary<int, List<int>> current, int subTarget)
|
32
|
+
{
|
33
|
+
var subTargetMinimalCoins = MinimalCoins(current, subTarget);
|
34
|
+
if (subTargetMinimalCoins != null)
|
35
|
+
current.Add(subTarget, subTargetMinimalCoins);
|
36
|
+
|
37
|
+
return current;
|
38
|
+
}
|
36
39
|
|
37
|
-
|
40
|
+
List<int> MinimalCoins(Dictionary<int, List<int>> current, int subTarget)
|
41
|
+
{
|
42
|
+
return coins
|
43
|
+
.Where(coin => coin <= subTarget)
|
44
|
+
.Select(coin => current.TryGetValue(subTarget - coin, out var subTargetMinimalCoins)
|
45
|
+
? subTargetMinimalCoins.Append(coin).ToList()
|
46
|
+
: null)
|
47
|
+
.Where(subTargetMinimalCoins => subTargetMinimalCoins != null)
|
48
|
+
.OrderBy(subTargetMinimalCoins => subTargetMinimalCoins.Count)
|
49
|
+
.FirstOrDefault();
|
50
|
+
}
|
38
51
|
}
|
39
52
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
public class CircularBuffer<T>
|
4
4
|
{
|
5
|
-
public CircularBuffer(int
|
5
|
+
public CircularBuffer(int capacity)
|
6
6
|
{
|
7
7
|
throw new NotImplementedException("You need to implement this function.");
|
8
8
|
}
|
@@ -17,7 +17,7 @@ public void Write(T value)
|
|
17
17
|
throw new NotImplementedException("You need to implement this function.");
|
18
18
|
}
|
19
19
|
|
20
|
-
public void
|
20
|
+
public void Overwrite(T value)
|
21
21
|
{
|
22
22
|
throw new NotImplementedException("You need to implement this function.");
|
23
23
|
}
|
@@ -1,158 +1,135 @@
|
|
1
|
-
|
1
|
+
// This file was auto-generated based on version 1.1.0 of the canonical data.
|
2
|
+
|
2
3
|
using Xunit;
|
4
|
+
using System;
|
3
5
|
|
4
6
|
public class CircularBufferTest
|
5
7
|
{
|
6
8
|
[Fact]
|
7
|
-
public void
|
9
|
+
public void Reading_empty_buffer_should_fail()
|
8
10
|
{
|
9
|
-
var buffer = new CircularBuffer<
|
10
|
-
buffer.Write('1');
|
11
|
-
var val = buffer.Read();
|
12
|
-
|
13
|
-
Assert.Equal('1', val);
|
11
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
14
12
|
Assert.Throws<InvalidOperationException>(() => buffer.Read());
|
15
13
|
}
|
16
14
|
|
17
15
|
[Fact(Skip = "Remove to run test")]
|
18
|
-
public void
|
16
|
+
public void Can_read_an_item_just_written()
|
19
17
|
{
|
20
|
-
var buffer = new CircularBuffer<
|
21
|
-
buffer.Write(
|
22
|
-
buffer.
|
23
|
-
|
24
|
-
var val1 = buffer.Read();
|
25
|
-
var val2 = buffer.Read();
|
26
|
-
|
27
|
-
Assert.Equal('1', val1);
|
28
|
-
Assert.Equal('2', val2);
|
29
|
-
Assert.Throws<InvalidOperationException>(() => buffer.Read());
|
18
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
19
|
+
buffer.Write(1);
|
20
|
+
Assert.Equal(1, buffer.Read());
|
30
21
|
}
|
31
22
|
|
32
23
|
[Fact(Skip = "Remove to run test")]
|
33
|
-
public void
|
24
|
+
public void Each_item_may_only_be_read_once()
|
34
25
|
{
|
35
|
-
var buffer = new CircularBuffer<
|
36
|
-
buffer.Write(
|
37
|
-
buffer.
|
38
|
-
buffer.Write('3');
|
39
|
-
|
40
|
-
buffer.Clear();
|
41
|
-
|
26
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
27
|
+
buffer.Write(1);
|
28
|
+
Assert.Equal(1, buffer.Read());
|
42
29
|
Assert.Throws<InvalidOperationException>(() => buffer.Read());
|
43
|
-
|
44
|
-
buffer.Write('1');
|
45
|
-
buffer.Write('2');
|
46
|
-
|
47
|
-
var val1 = buffer.Read();
|
48
|
-
buffer.Write('3');
|
49
|
-
var val2 = buffer.Read();
|
50
|
-
|
51
|
-
Assert.Equal('1', val1);
|
52
|
-
Assert.Equal('2', val2);
|
53
30
|
}
|
54
31
|
|
55
32
|
[Fact(Skip = "Remove to run test")]
|
56
|
-
public void
|
33
|
+
public void Items_are_read_in_the_order_they_are_written()
|
57
34
|
{
|
58
|
-
var buffer = new CircularBuffer<
|
59
|
-
buffer.Write(
|
60
|
-
|
61
|
-
buffer.
|
62
|
-
|
63
|
-
|
64
|
-
Assert.Equal('1', val1);
|
65
|
-
Assert.Equal('2', val2);
|
35
|
+
var buffer = new CircularBuffer<int>(capacity: 2);
|
36
|
+
buffer.Write(1);
|
37
|
+
buffer.Write(2);
|
38
|
+
Assert.Equal(1, buffer.Read());
|
39
|
+
Assert.Equal(2, buffer.Read());
|
66
40
|
}
|
67
41
|
|
68
42
|
[Fact(Skip = "Remove to run test")]
|
69
|
-
public void
|
43
|
+
public void Full_buffer_cant_be_written_to()
|
70
44
|
{
|
71
|
-
var
|
72
|
-
|
73
|
-
|
74
|
-
var val1 = buffer1.Read();
|
75
|
-
|
76
|
-
buffer1.Write('3');
|
77
|
-
var val2 = buffer1.Read();
|
78
|
-
var val3 = buffer1.Read();
|
79
|
-
Assert.Equal('2', val2);
|
80
|
-
Assert.Equal('3', val3);
|
45
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
46
|
+
buffer.Write(1);
|
47
|
+
Assert.Throws<InvalidOperationException>(() => buffer.Write(2));
|
81
48
|
}
|
82
49
|
|
83
50
|
[Fact(Skip = "Remove to run test")]
|
84
|
-
public void
|
51
|
+
public void A_read_frees_up_capacity_for_another_write()
|
85
52
|
{
|
86
|
-
var buffer = new CircularBuffer<
|
87
|
-
buffer.Write(
|
88
|
-
buffer.
|
89
|
-
|
90
|
-
Assert.
|
53
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
54
|
+
buffer.Write(1);
|
55
|
+
Assert.Equal(1, buffer.Read());
|
56
|
+
buffer.Write(2);
|
57
|
+
Assert.Equal(2, buffer.Read());
|
91
58
|
}
|
92
59
|
|
93
60
|
[Fact(Skip = "Remove to run test")]
|
94
|
-
public void
|
61
|
+
public void Read_position_is_maintained_even_across_multiple_writes()
|
95
62
|
{
|
96
|
-
var buffer = new CircularBuffer<
|
97
|
-
buffer.Write(
|
98
|
-
buffer.Write(
|
99
|
-
buffer.
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
Assert.Equal('2', val1);
|
105
|
-
Assert.Equal('A', val2);
|
106
|
-
Assert.Throws<InvalidOperationException>(() => buffer.Read());
|
63
|
+
var buffer = new CircularBuffer<int>(capacity: 3);
|
64
|
+
buffer.Write(1);
|
65
|
+
buffer.Write(2);
|
66
|
+
Assert.Equal(1, buffer.Read());
|
67
|
+
buffer.Write(3);
|
68
|
+
Assert.Equal(2, buffer.Read());
|
69
|
+
Assert.Equal(3, buffer.Read());
|
107
70
|
}
|
108
71
|
|
109
72
|
[Fact(Skip = "Remove to run test")]
|
110
|
-
public void
|
73
|
+
public void Items_cleared_out_of_buffer_cant_be_read()
|
111
74
|
{
|
112
|
-
var buffer = new CircularBuffer<
|
113
|
-
buffer.Write(
|
114
|
-
buffer.
|
115
|
-
|
116
|
-
var val1 = buffer.Read();
|
117
|
-
var val2 = buffer.Read();
|
118
|
-
|
119
|
-
Assert.Equal('1', val1);
|
120
|
-
Assert.Equal('2', val2);
|
75
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
76
|
+
buffer.Write(1);
|
77
|
+
buffer.Clear();
|
121
78
|
Assert.Throws<InvalidOperationException>(() => buffer.Read());
|
122
79
|
}
|
123
80
|
|
124
81
|
[Fact(Skip = "Remove to run test")]
|
125
|
-
public void
|
82
|
+
public void Clear_frees_up_capacity_for_another_write()
|
126
83
|
{
|
127
|
-
var buffer = new CircularBuffer<
|
128
|
-
buffer.Write(
|
129
|
-
buffer.
|
130
|
-
buffer.Write(
|
131
|
-
|
132
|
-
|
133
|
-
var val2 = buffer.Read();
|
134
|
-
buffer.Write('4');
|
135
|
-
var val3 = buffer.Read();
|
84
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
85
|
+
buffer.Write(1);
|
86
|
+
buffer.Clear();
|
87
|
+
buffer.Write(2);
|
88
|
+
Assert.Equal(2, buffer.Read());
|
89
|
+
}
|
136
90
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
buffer
|
91
|
+
[Fact(Skip = "Remove to run test")]
|
92
|
+
public void Clear_does_nothing_on_empty_buffer()
|
93
|
+
{
|
94
|
+
var buffer = new CircularBuffer<int>(capacity: 1);
|
95
|
+
buffer.Clear();
|
96
|
+
buffer.Write(1);
|
97
|
+
Assert.Equal(1, buffer.Read());
|
98
|
+
}
|
141
99
|
|
142
|
-
|
143
|
-
|
100
|
+
[Fact(Skip = "Remove to run test")]
|
101
|
+
public void Overwrite_acts_like_write_on_non_full_buffer()
|
102
|
+
{
|
103
|
+
var buffer = new CircularBuffer<int>(capacity: 2);
|
104
|
+
buffer.Write(1);
|
105
|
+
buffer.Overwrite(2);
|
106
|
+
Assert.Equal(1, buffer.Read());
|
107
|
+
Assert.Equal(2, buffer.Read());
|
108
|
+
}
|
144
109
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
var
|
149
|
-
|
110
|
+
[Fact(Skip = "Remove to run test")]
|
111
|
+
public void Overwrite_replaces_the_oldest_item_on_full_buffer()
|
112
|
+
{
|
113
|
+
var buffer = new CircularBuffer<int>(capacity: 2);
|
114
|
+
buffer.Write(1);
|
115
|
+
buffer.Write(2);
|
116
|
+
buffer.Overwrite(3);
|
117
|
+
Assert.Equal(2, buffer.Read());
|
118
|
+
Assert.Equal(3, buffer.Read());
|
119
|
+
}
|
150
120
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
121
|
+
[Fact(Skip = "Remove to run test")]
|
122
|
+
public void Overwrite_replaces_the_oldest_item_remaining_in_buffer_following_a_read()
|
123
|
+
{
|
124
|
+
var buffer = new CircularBuffer<int>(capacity: 3);
|
125
|
+
buffer.Write(1);
|
126
|
+
buffer.Write(2);
|
127
|
+
buffer.Write(3);
|
128
|
+
Assert.Equal(1, buffer.Read());
|
129
|
+
buffer.Write(4);
|
130
|
+
buffer.Overwrite(5);
|
131
|
+
Assert.Equal(3, buffer.Read());
|
132
|
+
Assert.Equal(4, buffer.Read());
|
133
|
+
Assert.Equal(5, buffer.Read());
|
157
134
|
}
|
158
135
|
}
|