trackler 2.2.1.45 → 2.2.1.46
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/complex-numbers/description.md +27 -0
- data/problem-specifications/exercises/crypto-square/canonical-data.json +39 -43
- data/problem-specifications/exercises/crypto-square/description.md +6 -4
- data/problem-specifications/exercises/hamming/canonical-data.json +5 -5
- data/problem-specifications/exercises/kindergarten-garden/description.md +10 -10
- data/problem-specifications/exercises/leap/canonical-data.json +2 -2
- data/problem-specifications/exercises/markdown/canonical-data.json +2 -2
- data/problem-specifications/exercises/nucleotide-count/canonical-data.json +12 -1
- data/problem-specifications/exercises/pangram/canonical-data.json +7 -1
- data/problem-specifications/exercises/queen-attack/canonical-data.json +83 -26
- data/problem-specifications/exercises/space-age/description.md +1 -2
- data/problem-specifications/exercises/zipper/canonical-data.json +671 -0
- data/tracks/bash/config.json +13 -1
- data/tracks/bash/exercises/atbash-cipher/README.md +45 -0
- data/tracks/bash/exercises/atbash-cipher/atbash_cipher_tests.sh +73 -0
- data/tracks/bash/exercises/atbash-cipher/example.sh +14 -0
- data/tracks/bash/exercises/gigasecond/.meta/hints.md +33 -0
- data/tracks/bash/exercises/two-fer/README.md +0 -22
- data/tracks/c/exercises/allergies/src/allergies.h +9 -9
- data/tracks/c/exercises/allergies/src/example.c +2 -2
- data/tracks/c/exercises/allergies/src/example.h +9 -9
- data/tracks/c/exercises/allergies/test/test_allergies.c +34 -34
- data/tracks/c/exercises/clock/test/test_clock.c +0 -52
- data/tracks/c/exercises/meetup/test/test_meetup.c +604 -114
- data/tracks/c/exercises/nucleotide-count/src/example.c +10 -10
- data/tracks/c/exercises/palindrome-products/src/example.c +8 -8
- data/tracks/c/exercises/palindrome-products/src/example.h +5 -5
- data/tracks/c/exercises/palindrome-products/test/test_palindrome_products.c +8 -6
- data/tracks/c/exercises/robot-simulator/src/example.c +19 -19
- data/tracks/c/exercises/robot-simulator/src/robot_simulator.h +24 -24
- data/tracks/c/exercises/robot-simulator/test/test_robot_simulator.c +35 -34
- data/tracks/c/exercises/series/src/example.c +10 -10
- data/tracks/c/exercises/series/src/series.h +5 -5
- data/tracks/c/exercises/series/test/test_series.c +77 -30
- data/tracks/c/exercises/sieve/src/example.c +17 -17
- data/tracks/c/exercises/sieve/src/sieve.h +2 -2
- data/tracks/c/exercises/sieve/test/test_sieve.c +6 -6
- data/tracks/c/exercises/space-age/src/example.c +1 -1
- data/tracks/c/exercises/space-age/src/example.h +3 -3
- data/tracks/c/exercises/space-age/test/test_space_age.c +2 -0
- data/tracks/c/exercises/sum-of-multiples/src/example.c +3 -1
- data/tracks/c/exercises/sum-of-multiples/test/test_sum_of_multiples.c +17 -0
- data/tracks/c/exercises/triangle/src/example.c +4 -4
- data/tracks/c/exercises/triangle/src/example.h +4 -4
- data/tracks/c/exercises/triangle/src/triangle.h +1 -1
- data/tracks/c/exercises/triangle/test/test_triangle.c +18 -16
- data/tracks/c/exercises/word-count/src/example.c +24 -24
- data/tracks/c/exercises/word-count/src/word_count.h +3 -3
- data/tracks/c/exercises/word-count/test/test_word_count.c +139 -139
- data/tracks/cfml/exercises/acronym/README.md +31 -0
- data/tracks/cfml/exercises/atbash-cipher/README.md +50 -0
- data/tracks/cfml/exercises/bob/README.md +34 -0
- data/tracks/cfml/exercises/diamond/README.md +75 -0
- data/tracks/cfml/exercises/difference-of-squares/README.md +35 -0
- data/tracks/cfml/exercises/flatten-array/README.md +34 -0
- data/tracks/cfml/exercises/gigasecond/README.md +27 -0
- data/tracks/cfml/exercises/grains/README.md +50 -0
- data/tracks/cfml/exercises/hamming/README.md +58 -0
- data/tracks/cfml/exercises/hello-world/README.md +37 -0
- data/tracks/cfml/exercises/isogram/README.md +35 -0
- data/tracks/cfml/exercises/largest-series-product/README.md +36 -0
- data/tracks/cfml/exercises/leap/README.md +16 -0
- data/tracks/cfml/exercises/luhn/README.md +87 -0
- data/tracks/cfml/exercises/markdown/README.md +34 -0
- data/tracks/cfml/exercises/nth-prime/README.md +31 -0
- data/tracks/cfml/exercises/pangram/README.md +31 -0
- data/tracks/cfml/exercises/pig-latin/README.md +40 -0
- data/tracks/cfml/exercises/raindrops/README.md +40 -0
- data/tracks/cfml/exercises/rna-transcription/README.md +41 -0
- data/tracks/cfml/exercises/saddle-points/README.md +49 -0
- data/tracks/cfml/exercises/scrabble-score/README.md +60 -0
- data/tracks/cfml/exercises/secret-handshake/README.md +51 -0
- data/tracks/cfml/exercises/space-age/README.md +41 -0
- data/tracks/cfml/exercises/sum-of-multiples/README.md +34 -0
- data/tracks/cfml/exercises/triangle/README.md +42 -0
- data/tracks/cfml/exercises/word-count/README.md +35 -0
- data/tracks/clojure/config.json +10 -0
- data/tracks/clojure/exercises/spiral-matrix/README.md +32 -0
- data/tracks/clojure/exercises/spiral-matrix/project.clj +4 -0
- data/tracks/clojure/exercises/spiral-matrix/src/example.clj +11 -0
- data/tracks/clojure/exercises/spiral-matrix/src/spiral_matrix.clj +3 -0
- data/tracks/clojure/exercises/spiral-matrix/test/spiral_matrix_test.clj +58 -0
- data/tracks/common-lisp/config.json +20 -0
- data/tracks/common-lisp/exercises/hello-world/README.md +68 -0
- data/tracks/common-lisp/exercises/hello-world/example.lisp +9 -0
- data/tracks/common-lisp/exercises/hello-world/hello-world-test.lisp +21 -0
- data/tracks/common-lisp/exercises/hello-world/hello-world.lisp +6 -0
- data/tracks/common-lisp/exercises/perfect-numbers/README.md +72 -0
- data/tracks/common-lisp/exercises/perfect-numbers/example.lisp +17 -0
- data/tracks/common-lisp/exercises/perfect-numbers/perfect-numbers-test.lisp +56 -0
- data/tracks/common-lisp/exercises/perfect-numbers/perfect-numbers.lisp +7 -0
- data/tracks/cpp/.travis.yml +34 -14
- data/tracks/cpp/docs/INSTALLATION.md +17 -28
- data/tracks/cpp/docs/TESTS.md +13 -21
- data/tracks/crystal/config.json +10 -0
- data/tracks/crystal/exercises/triangle/spec/triangle_spec.cr +60 -0
- data/tracks/crystal/exercises/triangle/src/example.cr +31 -0
- data/tracks/crystal/exercises/triangle/src/triangle.cr +1 -0
- data/tracks/crystal/generator/spec/remote_data_file_spec.cr +0 -1
- data/tracks/crystal/generator/src/generators/triangle.cr +38 -0
- data/tracks/crystal/generator/src/remote_data_file.cr +1 -1
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquares.cs +4 -4
- data/tracks/csharp/exercises/difference-of-squares/DifferenceOfSquaresTest.cs +22 -27
- data/tracks/csharp/exercises/difference-of-squares/Example.cs +5 -5
- data/tracks/csharp/exercises/error-handling/ErrorHandlingTest.cs +4 -4
- data/tracks/csharp/exercises/flatten-array/Example.cs +1 -1
- data/tracks/csharp/exercises/flatten-array/FlattenArray.cs +1 -1
- data/tracks/csharp/exercises/flatten-array/FlattenArrayTest.cs +106 -72
- data/tracks/csharp/exercises/largest-series-product/LargestSeriesProductTest.cs +24 -98
- data/tracks/csharp/exercises/minesweeper/Example.cs +3 -3
- data/tracks/csharp/exercises/minesweeper/Minesweeper.cs +1 -1
- data/tracks/csharp/exercises/minesweeper/MinesweeperTest.cs +155 -57
- data/tracks/csharp/generators/Exercises/DifferenceOfSquares.cs +25 -0
- data/tracks/csharp/generators/Exercises/FlattenArray.cs +36 -0
- data/tracks/csharp/generators/Exercises/LargestSeriesProduct.cs +18 -0
- data/tracks/csharp/generators/Exercises/Minesweeper.cs +32 -0
- data/tracks/d/docs/EXERCISE_README_INSERT.md +1 -1
- data/tracks/d/exercises/bob/README.md +1 -1
- data/tracks/d/exercises/circular-buffer/README.md +1 -1
- data/tracks/d/exercises/crypto-square/README.md +1 -1
- data/tracks/d/exercises/difference-of-squares/README.md +1 -1
- data/tracks/d/exercises/etl/README.md +1 -1
- data/tracks/d/exercises/gigasecond/README.md +1 -1
- data/tracks/d/exercises/hamming/README.md +1 -1
- data/tracks/d/exercises/hello-world/README.md +1 -1
- data/tracks/d/exercises/leap/README.md +1 -1
- data/tracks/d/exercises/nucleotide-count/README.md +1 -1
- data/tracks/d/exercises/pangram/README.md +1 -1
- data/tracks/d/exercises/raindrops/README.md +1 -1
- data/tracks/d/exercises/react/README.md +1 -1
- data/tracks/d/exercises/rna-transcription/README.md +1 -1
- data/tracks/d/exercises/robot-name/README.md +1 -1
- data/tracks/d/exercises/roman-numerals/README.md +1 -1
- data/tracks/d/exercises/series/README.md +1 -1
- data/tracks/d/exercises/triangle/README.md +1 -1
- data/tracks/dart/CONTRIBUTING.md +61 -0
- data/tracks/dart/README.md +10 -47
- data/tracks/dart/config.json +13 -1
- data/tracks/dart/exercises/anagram/README.md +10 -0
- data/tracks/dart/exercises/bob/README.md +11 -0
- data/tracks/dart/exercises/difference-of-squares/README.md +11 -0
- data/tracks/dart/exercises/gigasecond/README.md +11 -0
- data/tracks/dart/exercises/gigasecond/test/gigasecond_test.dart +56 -33
- data/tracks/dart/exercises/hamming/README.md +11 -0
- data/tracks/dart/exercises/hamming/lib/example.dart +2 -2
- data/tracks/dart/exercises/hamming/test/hamming_test.dart +41 -24
- data/tracks/dart/exercises/hello-world/README.md +11 -0
- data/tracks/dart/exercises/leap/README.md +12 -1
- data/tracks/dart/exercises/phone-number/README.md +56 -0
- data/tracks/dart/exercises/phone-number/lib/example.dart +45 -0
- data/tracks/dart/exercises/phone-number/lib/phone_number.dart +3 -0
- data/tracks/dart/exercises/phone-number/pubspec.lock +293 -0
- data/tracks/dart/exercises/phone-number/pubspec.yaml +3 -0
- data/tracks/dart/exercises/phone-number/test/phone_number_test.dart +66 -0
- data/tracks/dart/exercises/raindrops/README.md +35 -0
- data/tracks/dart/exercises/rna-transcription/README.md +11 -0
- data/tracks/dart/exercises/word-count/README.md +14 -3
- data/tracks/delphi/docs/RESOURCES.md +10 -11
- data/tracks/elixir/exercises/hello-world/hello_world.exs +1 -1
- data/tracks/elixir/exercises/secret-handshake/README.md +3 -5
- data/tracks/elm/exercises/isogram/Isogram.example.elm +4 -4
- data/tracks/erlang/config.json +10 -0
- data/tracks/erlang/exercises/sieve/README.md +88 -0
- data/tracks/erlang/exercises/sieve/include/exercism.hrl +11 -0
- data/tracks/erlang/exercises/sieve/rebar.config +30 -0
- data/tracks/erlang/exercises/sieve/src/example.erl +16 -0
- data/tracks/erlang/exercises/sieve/src/sieve.app.src +9 -0
- data/tracks/erlang/exercises/sieve/src/sieve.erl +8 -0
- data/tracks/erlang/exercises/sieve/test/sieve_tests.erl +38 -0
- data/tracks/fsharp/.gitignore +2 -1
- data/tracks/fsharp/exercises/crypto-square/CryptoSquareTest.fs +10 -6
- data/tracks/fsharp/exercises/leap/LeapTest.fs +2 -2
- data/tracks/fsharp/exercises/pangram/PangramTest.fs +5 -1
- data/tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs +7 -7
- data/tracks/fsharp/exercises/run-length-encoding/Example.fs +2 -2
- data/tracks/fsharp/exercises/run-length-encoding/RunLengthEncodingTest.fs +42 -30
- data/tracks/fsharp/generators/Generators.fs +21 -8
- data/tracks/gnu-apl/test.apl +4 -4
- data/tracks/go/README.md +1 -2
- data/tracks/go/config/maintainers.json +5 -6
- data/tracks/groovy/config.json +23 -0
- data/tracks/groovy/exercises/binary-search/BinarySearch.groovy +14 -0
- data/tracks/groovy/exercises/binary-search/BinarySearchSpec.groovy +56 -0
- data/tracks/groovy/exercises/binary-search/Example.groovy +43 -0
- data/tracks/groovy/exercises/binary-search/README.md +59 -0
- data/tracks/groovy/exercises/triangle/Example.groovy +23 -0
- data/tracks/groovy/exercises/triangle/README.md +42 -0
- data/tracks/groovy/exercises/triangle/Triangle.groovy +15 -0
- data/tracks/groovy/exercises/triangle/TriangleSpec.groovy +66 -0
- data/tracks/haskell/config.json +9 -0
- data/tracks/haskell/exercises/all-your-base/package.yaml +1 -1
- data/tracks/haskell/exercises/all-your-base/test/Tests.hs +18 -18
- data/tracks/haskell/exercises/bowling/package.yaml +1 -1
- data/tracks/haskell/exercises/bowling/test/Tests.hs +9 -9
- data/tracks/haskell/exercises/change/package.yaml +1 -1
- data/tracks/haskell/exercises/change/test/Tests.hs +5 -0
- data/tracks/haskell/exercises/complex-numbers/README.md +92 -0
- data/tracks/haskell/exercises/complex-numbers/examples/success-standard/package.yaml +16 -0
- data/tracks/haskell/exercises/complex-numbers/examples/success-standard/src/ComplexNumbers.hs +50 -0
- data/tracks/haskell/exercises/complex-numbers/package.yaml +20 -0
- data/tracks/haskell/exercises/complex-numbers/src/ComplexNumbers.hs +45 -0
- data/tracks/haskell/exercises/complex-numbers/stack.yaml +1 -0
- data/tracks/haskell/exercises/complex-numbers/test/Tests.hs +194 -0
- data/tracks/haskell/exercises/crypto-square/package.yaml +1 -1
- data/tracks/haskell/exercises/crypto-square/test/Tests.hs +20 -12
- data/tracks/haskell/exercises/dominoes/package.yaml +1 -1
- data/tracks/haskell/exercises/forth/package.yaml +1 -1
- data/tracks/haskell/exercises/forth/test/Tests.hs +4 -3
- data/tracks/haskell/exercises/hamming/package.yaml +1 -1
- data/tracks/haskell/exercises/hamming/test/Tests.hs +6 -6
- data/tracks/haskell/exercises/isogram/package.yaml +1 -1
- data/tracks/haskell/exercises/isogram/test/Tests.hs +2 -2
- data/tracks/haskell/exercises/leap/package.yaml +1 -1
- data/tracks/haskell/exercises/leap/test/Tests.hs +1 -1
- data/tracks/haskell/exercises/pascals-triangle/package.yaml +1 -1
- data/tracks/haskell/exercises/pig-latin/examples/success-standard/src/PigLatin.hs +2 -0
- data/tracks/haskell/exercises/pig-latin/package.yaml +1 -1
- data/tracks/haskell/exercises/pig-latin/test/Tests.hs +8 -0
- data/tracks/haskell/exercises/queen-attack/package.yaml +1 -1
- data/tracks/haskell/exercises/rna-transcription/package.yaml +1 -1
- data/tracks/haskell/exercises/rna-transcription/test/Tests.hs +8 -8
- data/tracks/haskell/exercises/robot-simulator/package.yaml +1 -1
- data/tracks/haskell/exercises/secret-handshake/package.yaml +1 -1
- data/tracks/haskell/exercises/secret-handshake/test/Tests.hs +0 -3
- data/tracks/haskell/exercises/sum-of-multiples/package.yaml +1 -1
- data/tracks/haskell/exercises/sum-of-multiples/test/Tests.hs +4 -0
- data/tracks/haskell/exercises/zipper/package.yaml +1 -1
- data/tracks/haskell/exercises/zipper/test/Tests.hs +23 -0
- data/tracks/java/config.json +85 -13
- data/tracks/java/config/maintainers.json +1 -1
- data/tracks/java/exercises/accumulate/README.md +0 -3
- data/tracks/java/exercises/acronym/.meta/.version +1 -0
- data/tracks/java/exercises/acronym/README.md +0 -1
- data/tracks/java/exercises/acronym/src/test/java/AcronymTest.java +0 -3
- data/tracks/java/exercises/all-your-base/.meta/.version +1 -0
- data/tracks/java/exercises/all-your-base/README.md +1 -1
- data/tracks/java/exercises/all-your-base/src/test/java/BaseConverterTest.java +0 -3
- data/tracks/java/exercises/allergies/README.md +0 -1
- data/tracks/java/exercises/atbash-cipher/README.md +2 -1
- data/tracks/java/exercises/beer-song/README.md +1 -1
- data/tracks/java/exercises/binary/README.md +2 -0
- data/tracks/java/exercises/book-store/README.md +5 -5
- data/tracks/java/exercises/bowling/README.md +20 -6
- data/tracks/java/exercises/change/.meta/.version +1 -0
- data/tracks/java/exercises/change/README.md +1 -1
- data/tracks/java/exercises/change/src/test/java/ChangeCalculatorTest.java +0 -3
- data/tracks/java/exercises/circular-buffer/README.md +13 -6
- data/tracks/java/exercises/clock/.meta/.version +1 -0
- data/tracks/java/exercises/clock/src/test/java/ClockAddTest.java +0 -3
- data/tracks/java/exercises/clock/src/test/java/ClockCreationTest.java +0 -3
- data/tracks/java/exercises/clock/src/test/java/ClockEqualTest.java +0 -3
- data/tracks/java/exercises/collatz-conjecture/.meta/.version +1 -0
- data/tracks/java/exercises/collatz-conjecture/README.md +1 -1
- data/tracks/java/exercises/collatz-conjecture/src/test/java/CollatzCalculatorTest.java +0 -3
- data/tracks/java/exercises/complex-numbers/README.md +27 -0
- data/tracks/java/exercises/crypto-square/README.md +10 -8
- data/tracks/java/exercises/diamond/.meta/.version +1 -0
- data/tracks/java/exercises/diamond/README.md +6 -6
- data/tracks/java/exercises/diamond/src/test/java/DiamondPrinterTest.java +0 -3
- data/tracks/java/exercises/difference-of-squares/.meta/.version +1 -0
- data/tracks/java/exercises/difference-of-squares/src/test/java/DifferenceOfSquaresCalculatorTest.java +0 -3
- data/tracks/java/exercises/etl/README.md +2 -0
- data/tracks/java/exercises/flatten-array/.meta/.version +1 -0
- data/tracks/java/exercises/flatten-array/README.md +1 -2
- data/tracks/java/exercises/flatten-array/src/test/java/FlattenerTest.java +0 -3
- data/tracks/java/exercises/food-chain/README.md +1 -1
- data/tracks/java/exercises/forth/.meta/.version +1 -0
- data/tracks/java/exercises/forth/src/test/java/ForthEvaluatorTest.java +0 -3
- data/tracks/java/exercises/grade-school/README.md +0 -1
- data/tracks/java/exercises/hamming/.meta/.version +1 -0
- data/tracks/java/exercises/hamming/src/test/java/HammingTest.java +0 -3
- data/tracks/java/exercises/house/README.md +1 -2
- data/tracks/java/exercises/isogram/README.md +2 -1
- data/tracks/java/exercises/kindergarten-garden/README.md +13 -13
- data/tracks/java/exercises/linked-list/README.md +10 -10
- data/tracks/java/exercises/list-ops/.meta/.version +1 -0
- data/tracks/java/exercises/list-ops/README.md +4 -0
- data/tracks/java/exercises/list-ops/src/test/java/ListOpsTest.java +0 -3
- data/tracks/java/exercises/luhn/README.md +7 -7
- data/tracks/java/exercises/matrix/README.md +6 -4
- data/tracks/java/exercises/meetup/README.md +1 -2
- data/tracks/java/exercises/minesweeper/.meta/.version +1 -0
- data/tracks/java/exercises/minesweeper/src/test/java/MinesweeperBoardTest.java +0 -3
- data/tracks/java/exercises/nucleotide-count/README.md +8 -22
- data/tracks/java/exercises/ocr-numbers/README.md +5 -5
- data/tracks/java/exercises/octal/README.md +6 -2
- data/tracks/java/exercises/palindrome-products/README.md +15 -16
- data/tracks/java/exercises/pangram/.meta/.version +1 -0
- data/tracks/java/exercises/pangram/README.md +1 -1
- data/tracks/java/exercises/pangram/src/test/java/PangramCheckerTest.java +0 -3
- data/tracks/java/exercises/pascals-triangle/.meta/.version +1 -0
- data/tracks/java/exercises/pascals-triangle/README.md +1 -1
- data/tracks/java/exercises/pascals-triangle/src/test/java/PascalsTriangleGeneratorTest.java +0 -3
- data/tracks/java/exercises/perfect-numbers/.meta/.version +1 -0
- data/tracks/java/exercises/perfect-numbers/README.md +2 -2
- data/tracks/java/exercises/perfect-numbers/src/test/java/NaturalNumberTest.java +0 -3
- data/tracks/java/exercises/phone-number/README.md +3 -2
- data/tracks/java/exercises/pythagorean-triplet/README.md +3 -3
- data/tracks/java/exercises/queen-attack/README.md +1 -1
- data/tracks/java/exercises/rectangles/README.md +7 -7
- data/tracks/java/exercises/rna-transcription/.meta/.version +1 -0
- data/tracks/java/exercises/rna-transcription/src/test/java/RnaTranscriptionTest.java +0 -3
- data/tracks/java/exercises/roman-numerals/README.md +1 -1
- data/tracks/java/exercises/rotational-cipher/README.md +2 -1
- data/tracks/java/exercises/run-length-encoding/README.md +4 -4
- data/tracks/java/exercises/saddle-points/.meta/.version +1 -0
- data/tracks/java/exercises/saddle-points/README.md +1 -1
- data/tracks/java/exercises/saddle-points/src/test/java/MatrixTest.java +0 -3
- data/tracks/java/exercises/scrabble-score/.meta/.version +1 -0
- data/tracks/java/exercises/scrabble-score/README.md +3 -1
- data/tracks/java/exercises/scrabble-score/src/test/java/ScrabbleScoreTest.java +0 -3
- data/tracks/java/exercises/secret-handshake/README.md +1 -1
- data/tracks/java/exercises/simple-cipher/README.md +1 -1
- data/tracks/java/exercises/simple-linked-list/src/test/java/SimpleLinkedListTest.java +25 -25
- data/tracks/java/exercises/space-age/README.md +1 -1
- data/tracks/java/exercises/spiral-matrix/.meta/.version +1 -0
- data/tracks/java/exercises/spiral-matrix/README.md +2 -2
- data/tracks/java/exercises/spiral-matrix/src/test/java/SpiralMatrixBuilderTest.java +0 -3
- data/tracks/java/exercises/sum-of-multiples/README.md +0 -3
- data/tracks/java/exercises/tournament/README.md +6 -5
- data/tracks/java/exercises/transpose/README.md +7 -7
- data/tracks/java/exercises/triangle/README.md +9 -6
- data/tracks/java/exercises/trinary/README.md +1 -1
- data/tracks/java/exercises/twelve-days/README.md +1 -1
- data/tracks/java/exercises/two-fer/README.md +1 -2
- data/tracks/java/exercises/word-count/README.md +1 -2
- data/tracks/java/exercises/word-search/.meta/.version +1 -0
- data/tracks/java/exercises/word-search/README.md +1 -1
- data/tracks/java/exercises/word-search/src/test/java/WordSearcherTest.java +0 -3
- data/tracks/java/exercises/wordy/README.md +0 -5
- data/tracks/javascript/config.json +13 -0
- data/tracks/javascript/docs/TESTS.md +1 -1
- data/tracks/javascript/exercises/diffie-hellman/example.js +1 -1
- data/tracks/javascript/exercises/hello-world/example.js +2 -3
- data/tracks/javascript/exercises/meetup/example.js +24 -27
- data/tracks/javascript/exercises/meetup/meetup.spec.js +0 -6
- data/tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js +1 -1
- data/tracks/javascript/exercises/protein-translation/README.md +73 -0
- data/tracks/javascript/exercises/protein-translation/example.js +68 -0
- data/tracks/javascript/exercises/protein-translation/protein-translation.spec.js +63 -0
- data/tracks/julia/README.md +1 -1
- data/tracks/kotlin/config.json +11 -0
- data/tracks/kotlin/exercises/acronym/README.md +0 -1
- data/tracks/kotlin/exercises/all-your-base/README.md +1 -1
- data/tracks/kotlin/exercises/allergies/README.md +0 -1
- data/tracks/kotlin/exercises/atbash-cipher/README.md +2 -1
- data/tracks/kotlin/exercises/beer-song/README.md +1 -1
- data/tracks/kotlin/exercises/binary/README.md +2 -0
- data/tracks/kotlin/exercises/change/README.md +1 -1
- data/tracks/kotlin/exercises/collatz-conjecture/README.md +1 -1
- data/tracks/kotlin/exercises/complex-numbers/README.md +27 -0
- data/tracks/kotlin/exercises/diamond/README.md +6 -6
- data/tracks/kotlin/exercises/etl/README.md +2 -0
- data/tracks/kotlin/exercises/flatten-array/README.md +1 -2
- data/tracks/kotlin/exercises/grade-school/README.md +0 -1
- data/tracks/kotlin/exercises/grains/README.md +0 -1
- data/tracks/kotlin/exercises/hello-world/.meta/hints.md +4 -0
- data/tracks/kotlin/exercises/hello-world/.meta/src/reference/kotlin/HelloWorld.kt +2 -2
- data/tracks/kotlin/exercises/hello-world/README.md +6 -0
- data/tracks/kotlin/exercises/hello-world/TUTORIAL.md +32 -434
- data/tracks/kotlin/exercises/hello-world/src/main/kotlin/HelloWorld.kt +1 -1
- data/tracks/kotlin/exercises/hello-world/src/test/kotlin/HelloWorldTest.kt +2 -21
- data/tracks/kotlin/exercises/isogram/README.md +2 -1
- data/tracks/kotlin/exercises/leap/README.md +1 -1
- data/tracks/kotlin/exercises/linked-list/README.md +10 -10
- data/tracks/kotlin/exercises/luhn/README.md +7 -7
- data/tracks/kotlin/exercises/meetup/README.md +1 -2
- data/tracks/kotlin/exercises/nucleotide-count/README.md +8 -22
- data/tracks/kotlin/exercises/pangram/README.md +1 -1
- data/tracks/kotlin/exercises/pascals-triangle/README.md +1 -1
- data/tracks/kotlin/exercises/perfect-numbers/README.md +2 -2
- data/tracks/kotlin/exercises/phone-number/README.md +3 -2
- data/tracks/kotlin/exercises/roman-numerals/README.md +1 -1
- data/tracks/kotlin/exercises/rotational-cipher/README.md +2 -1
- data/tracks/kotlin/exercises/saddle-points/README.md +1 -1
- data/tracks/kotlin/exercises/scrabble-score/README.md +3 -1
- data/tracks/kotlin/exercises/secret-handshake/README.md +1 -1
- data/tracks/kotlin/exercises/settings.gradle +1 -0
- data/tracks/kotlin/exercises/space-age/README.md +1 -2
- data/tracks/kotlin/exercises/spiral-matrix/README.md +2 -2
- data/tracks/kotlin/exercises/sum-of-multiples/README.md +0 -3
- data/tracks/kotlin/exercises/triangle/README.md +9 -6
- data/tracks/kotlin/exercises/two-fer/.meta/src/reference/kotlin/Twofer.kt +3 -0
- data/tracks/kotlin/exercises/two-fer/README.md +50 -0
- data/tracks/kotlin/exercises/two-fer/build.gradle +28 -0
- data/tracks/kotlin/exercises/two-fer/src/main/kotlin/.keep +0 -0
- data/tracks/kotlin/exercises/two-fer/src/test/kotlin/TwoferTest.kt +31 -0
- data/tracks/kotlin/exercises/word-count/README.md +1 -2
- data/tracks/ocaml/exercises/pangram/test.ml +3 -1
- data/tracks/perl5/.travis.yml +3 -1
- data/tracks/php/Makefile +2 -2
- data/tracks/php/README.md +4 -4
- data/tracks/php/config.json +15 -0
- data/tracks/php/exercises/transpose/example.php +30 -0
- data/tracks/php/exercises/transpose/transpose_test.php +116 -0
- data/tracks/php/{phpcs-xphp.xml → phpcs-php.xml} +0 -0
- data/tracks/python/.travis.yml +1 -1
- data/tracks/python/config.json +199 -39
- data/tracks/python/exercises/acronym/acronym_test.py +1 -1
- data/tracks/python/exercises/allergies/allergies_test.py +1 -1
- data/tracks/python/exercises/alphametics/alphametics_test.py +1 -1
- data/tracks/python/exercises/anagram/anagram_test.py +1 -1
- data/tracks/python/exercises/atbash-cipher/atbash_cipher_test.py +1 -1
- data/tracks/python/exercises/bob/bob.py +1 -1
- data/tracks/python/exercises/bob/bob_test.py +1 -1
- data/tracks/python/exercises/book-store/book_store_test.py +1 -1
- data/tracks/python/exercises/bracket-push/bracket_push.py +1 -1
- data/tracks/python/exercises/bracket-push/bracket_push_test.py +1 -1
- data/tracks/python/exercises/collatz-conjecture/collatz_conjecture_test.py +1 -1
- data/tracks/python/exercises/diamond/diamond_test.py +1 -1
- data/tracks/python/exercises/difference-of-squares/difference_of_squares_test.py +1 -1
- data/tracks/python/exercises/diffie-hellman/README.md +58 -0
- data/tracks/python/exercises/diffie-hellman/diffie_hellman.py +10 -0
- data/tracks/python/exercises/diffie-hellman/diffie_hellman_test.py +87 -0
- data/tracks/python/exercises/diffie-hellman/example.py +13 -0
- data/tracks/python/exercises/etl/etl_test.py +1 -1
- data/tracks/python/exercises/food-chain/README.md +81 -0
- data/tracks/python/exercises/food-chain/example.py +45 -0
- data/tracks/python/exercises/food-chain/food_chain.py +2 -0
- data/tracks/python/exercises/food-chain/food_chain_test.py +109 -0
- data/tracks/python/exercises/forth/README.md +43 -0
- data/tracks/python/exercises/forth/example.py +58 -0
- data/tracks/python/exercises/forth/forth.py +2 -0
- data/tracks/python/exercises/forth/forth_test.py +254 -0
- data/tracks/python/exercises/gigasecond/gigasecond_test.py +1 -1
- data/tracks/python/exercises/grep/grep_test.py +1 -1
- data/tracks/python/exercises/hello-world/hello_world_test.py +1 -1
- data/tracks/python/exercises/isogram/isogram_test.py +10 -10
- data/tracks/python/exercises/largest-series-product/largest_series_product_test.py +1 -1
- data/tracks/python/exercises/leap/leap_test.py +5 -5
- data/tracks/python/exercises/luhn/luhn_test.py +16 -16
- data/tracks/python/exercises/markdown/README.md +30 -0
- data/tracks/python/exercises/markdown/example.py +80 -0
- data/tracks/python/exercises/markdown/markdown.py +71 -0
- data/tracks/python/exercises/markdown/markdown_test.py +51 -0
- data/tracks/python/exercises/meetup/meetup_test.py +1 -1
- data/tracks/python/exercises/nth-prime/nth_prime_test.py +1 -1
- data/tracks/python/exercises/pascals-triangle/pascals_triangle_test.py +2 -2
- data/tracks/python/exercises/perfect-numbers/perfect_numbers_test.py +11 -11
- data/tracks/python/exercises/phone-number/phone_number_test.py +1 -1
- data/tracks/python/exercises/prime-factors/prime_factors_test.py +1 -1
- data/tracks/python/exercises/pythagorean-triplet/pythagorean_triplet_test.py +3 -3
- data/tracks/python/exercises/queen-attack/queen_attack_test.py +8 -8
- data/tracks/python/exercises/rail-fence-cipher/rail_fence_cipher_test.py +1 -1
- data/tracks/python/exercises/rectangles/rectangles_test.py +1 -1
- data/tracks/python/exercises/robot-simulator/robot_simulator.py +9 -1
- data/tracks/python/exercises/roman-numerals/roman_numerals_test.py +1 -1
- data/tracks/python/exercises/run-length-encoding/run_length_encoding_test.py +1 -1
- data/tracks/python/exercises/say/say_test.py +1 -1
- data/tracks/python/exercises/scrabble-score/scrabble_score_test.py +1 -1
- data/tracks/python/exercises/series/series.py +1 -1
- data/tracks/python/exercises/sieve/sieve_test.py +1 -1
- data/tracks/python/exercises/sublist/sublist_test.py +1 -1
- data/tracks/python/exercises/tournament/tournament_test.py +1 -1
- data/tracks/python/exercises/transpose/transpose_test.py +1 -1
- data/tracks/python/exercises/two-bucket/example.py +49 -54
- data/tracks/python/exercises/two-bucket/two_bucket_test.py +1 -1
- data/tracks/python/exercises/variable-length-quantity/variable_length_quantity_test.py +1 -1
- data/tracks/rust/config.json +24 -0
- data/tracks/rust/exercises/collatz-conjecture/Cargo.lock +4 -0
- data/tracks/rust/exercises/collatz-conjecture/Cargo.toml +3 -0
- data/tracks/rust/exercises/collatz-conjecture/README.md +65 -0
- data/tracks/rust/exercises/collatz-conjecture/example.rs +19 -0
- data/tracks/rust/exercises/collatz-conjecture/src/lib.rs +4 -0
- data/tracks/rust/exercises/collatz-conjecture/tests/collatz-conjecture.rs +32 -0
- data/tracks/rust/exercises/decimal/.gitignore +7 -0
- data/tracks/rust/exercises/decimal/.meta/description.md +19 -0
- data/tracks/rust/exercises/decimal/.meta/metadata.yml +3 -0
- data/tracks/rust/exercises/decimal/Cargo-example.toml +9 -0
- data/tracks/rust/exercises/decimal/Cargo.toml +6 -0
- data/tracks/rust/exercises/decimal/README.md +59 -0
- data/tracks/rust/exercises/decimal/example.rs +187 -0
- data/tracks/rust/exercises/decimal/src/lib.rs +10 -0
- data/tracks/rust/exercises/decimal/tests/decimal.rs +332 -0
- data/tracks/sml/exercises/accumulate/README.md +9 -1
- data/tracks/swift/exercises/luhn/Sources/LuhnExample.swift +17 -26
- data/tracks/swift/exercises/luhn/Tests/LinuxMain.swift +1 -1
- data/tracks/swift/exercises/luhn/Tests/LuhnTests/LuhnTests.swift +59 -35
- data/tracks/typescript/config.json +34 -0
- data/tracks/typescript/exercises/binary-search/README.md +67 -0
- data/tracks/typescript/exercises/binary-search/binary-search.example.ts +42 -0
- data/tracks/typescript/exercises/binary-search/binary-search.test.ts +27 -0
- data/tracks/typescript/exercises/binary-search/binary-search.ts +3 -0
- data/tracks/typescript/exercises/binary-search/package.json +36 -0
- data/tracks/typescript/exercises/binary-search/tsconfig.json +22 -0
- data/tracks/typescript/exercises/binary-search/tslint.json +127 -0
- data/tracks/typescript/exercises/binary-search/yarn.lock +2305 -0
- data/tracks/typescript/exercises/pascals-triangle/README.md +47 -0
- data/tracks/typescript/exercises/pascals-triangle/package.json +36 -0
- data/tracks/typescript/exercises/pascals-triangle/pascals-triangle.example.ts +32 -0
- data/tracks/typescript/exercises/pascals-triangle/pascals-triangle.test.ts +28 -0
- data/tracks/typescript/exercises/pascals-triangle/pascals-triangle.ts +2 -0
- data/tracks/typescript/exercises/pascals-triangle/tsconfig.json +22 -0
- data/tracks/typescript/exercises/pascals-triangle/tslint.json +127 -0
- data/tracks/typescript/exercises/pascals-triangle/yarn.lock +2305 -0
- data/tracks/typescript/exercises/rotational-cipher/README.md +63 -0
- data/tracks/typescript/exercises/rotational-cipher/package.json +36 -0
- data/tracks/typescript/exercises/rotational-cipher/rotational-cipher.example.ts +19 -0
- data/tracks/typescript/exercises/rotational-cipher/rotational-cipher.test.ts +56 -0
- data/tracks/typescript/exercises/rotational-cipher/rotational-cipher.ts +1 -0
- data/tracks/typescript/exercises/rotational-cipher/tsconfig.json +22 -0
- data/tracks/typescript/exercises/rotational-cipher/tslint.json +127 -0
- data/tracks/typescript/exercises/rotational-cipher/yarn.lock +2305 -0
- metadata +171 -5
- data/tracks/javascript/exercises/twelve-days/package.json +0 -69
- data/tracks/kotlin/exercises/hello-world/GETTING_STARTED.md +0 -50
@@ -0,0 +1,36 @@
|
|
1
|
+
# Largest Series Product
|
2
|
+
|
3
|
+
Given a string of digits, calculate the largest product for a contiguous
|
4
|
+
substring of digits of length n.
|
5
|
+
|
6
|
+
For example, for the input `'1027839564'`, the largest product for a
|
7
|
+
series of 3 digits is 270 (9 * 5 * 6), and the largest product for a
|
8
|
+
series of 5 digits is 7560 (7 * 8 * 3 * 9 * 5).
|
9
|
+
|
10
|
+
Note that these series are only required to occupy *adjacent positions*
|
11
|
+
in the input; the digits need not be *numerically consecutive*.
|
12
|
+
|
13
|
+
For the input `'73167176531330624919225119674426574742355349194934'`,
|
14
|
+
the largest product for a series of 6 digits is 23520.
|
15
|
+
|
16
|
+
* * * *
|
17
|
+
|
18
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
19
|
+
|
20
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
21
|
+
|
22
|
+
```bash
|
23
|
+
box task run TestRunner
|
24
|
+
# Or start up a test watcher that will rerun when files change
|
25
|
+
box task run TestRunner --:watcher
|
26
|
+
```
|
27
|
+
|
28
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
29
|
+
|
30
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
31
|
+
## Source
|
32
|
+
|
33
|
+
A variation on Problem 8 at Project Euler [http://projecteuler.net/problem=8](http://projecteuler.net/problem=8)
|
34
|
+
|
35
|
+
## Submitting Incomplete Solutions
|
36
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -25,6 +25,22 @@ For a delightful, four minute explanation of the whole leap year
|
|
25
25
|
phenomenon, go watch [this youtube video][video].
|
26
26
|
|
27
27
|
[video]: http://www.youtube.com/watch?v=xX96xng7sAE
|
28
|
+
|
29
|
+
* * * *
|
30
|
+
|
31
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
32
|
+
|
33
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
34
|
+
|
35
|
+
```bash
|
36
|
+
box task run TestRunner
|
37
|
+
# Or start up a test watcher that will rerun when files change
|
38
|
+
box task run TestRunner --:watcher
|
39
|
+
```
|
40
|
+
|
41
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
42
|
+
|
43
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
28
44
|
## Source
|
29
45
|
|
30
46
|
JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp)
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Luhn
|
2
|
+
|
3
|
+
Given a number determine whether or not it is valid per the Luhn formula.
|
4
|
+
|
5
|
+
The [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) is
|
6
|
+
a simple checksum formula used to validate a variety of identification
|
7
|
+
numbers, such as credit card numbers and Canadian Social Insurance
|
8
|
+
Numbers.
|
9
|
+
|
10
|
+
The task is to check if a given string is valid.
|
11
|
+
|
12
|
+
Validating a Number
|
13
|
+
------
|
14
|
+
|
15
|
+
Strings of length 1 or less are not valid. Spaces are allowed in the input,
|
16
|
+
but they should be stripped before checking. All other non-digit characters
|
17
|
+
are disallowed.
|
18
|
+
|
19
|
+
## Example 1: valid credit card number
|
20
|
+
|
21
|
+
```
|
22
|
+
4539 1488 0343 6467
|
23
|
+
```
|
24
|
+
|
25
|
+
The first step of the Luhn algorithm is to double every second digit,
|
26
|
+
starting from the right. We will be doubling
|
27
|
+
|
28
|
+
```
|
29
|
+
4_3_ 1_8_ 0_4_ 6_6_
|
30
|
+
```
|
31
|
+
|
32
|
+
If doubling the number results in a number greater than 9 then subtract 9
|
33
|
+
from the product. The results of our doubling:
|
34
|
+
|
35
|
+
```
|
36
|
+
8569 2478 0383 3437
|
37
|
+
```
|
38
|
+
|
39
|
+
Then sum all of the digits:
|
40
|
+
|
41
|
+
```
|
42
|
+
8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80
|
43
|
+
```
|
44
|
+
|
45
|
+
If the sum is evenly divisible by 10, then the number is valid. This number is valid!
|
46
|
+
|
47
|
+
## Example 2: invalid credit card number
|
48
|
+
|
49
|
+
```
|
50
|
+
8273 1232 7352 0569
|
51
|
+
```
|
52
|
+
|
53
|
+
Double the second digits, starting from the right
|
54
|
+
|
55
|
+
```
|
56
|
+
7253 2262 5312 0539
|
57
|
+
```
|
58
|
+
|
59
|
+
Sum the digits
|
60
|
+
|
61
|
+
```
|
62
|
+
7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
|
63
|
+
```
|
64
|
+
|
65
|
+
57 is not evenly divisible by 10, so this number is not valid.
|
66
|
+
|
67
|
+
* * * *
|
68
|
+
|
69
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
70
|
+
|
71
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
72
|
+
|
73
|
+
```bash
|
74
|
+
box task run TestRunner
|
75
|
+
# Or start up a test watcher that will rerun when files change
|
76
|
+
box task run TestRunner --:watcher
|
77
|
+
```
|
78
|
+
|
79
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
80
|
+
|
81
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
82
|
+
## Source
|
83
|
+
|
84
|
+
The Luhn Algorithm on Wikipedia [http://en.wikipedia.org/wiki/Luhn_algorithm](http://en.wikipedia.org/wiki/Luhn_algorithm)
|
85
|
+
|
86
|
+
## Submitting Incomplete Solutions
|
87
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Markdown
|
2
|
+
|
3
|
+
Refactor a Markdown parser.
|
4
|
+
|
5
|
+
The markdown exercise is a refactoring exercise. There is code that parses a
|
6
|
+
given string with [Markdown
|
7
|
+
syntax](https://guides.github.com/features/mastering-markdown/) and returns the
|
8
|
+
associated HTML for that string. Even though this code is confusingly written
|
9
|
+
and hard to follow, somehow it works and all the tests are passing! Your
|
10
|
+
challenge is to re-write this code to make it easier to read and maintain
|
11
|
+
while still making sure that all the tests keep passing.
|
12
|
+
|
13
|
+
It would be helpful if you made notes of what you did in your refactoring in
|
14
|
+
comments so reviewers can see that, but it isn't strictly necessary. The most
|
15
|
+
important thing is to make the code better!
|
16
|
+
|
17
|
+
* * * *
|
18
|
+
|
19
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
20
|
+
|
21
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
22
|
+
|
23
|
+
```bash
|
24
|
+
box task run TestRunner
|
25
|
+
# Or start up a test watcher that will rerun when files change
|
26
|
+
box task run TestRunner --:watcher
|
27
|
+
```
|
28
|
+
|
29
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
30
|
+
|
31
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
32
|
+
|
33
|
+
## Submitting Incomplete Solutions
|
34
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Nth Prime
|
2
|
+
|
3
|
+
Given a number n, determine what the nth prime is.
|
4
|
+
|
5
|
+
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that
|
6
|
+
the 6th prime is 13.
|
7
|
+
|
8
|
+
If your language provides methods in the standard library to deal with prime
|
9
|
+
numbers, pretend they don't exist and implement them yourself.
|
10
|
+
|
11
|
+
* * * *
|
12
|
+
|
13
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
14
|
+
|
15
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
box task run TestRunner
|
19
|
+
# Or start up a test watcher that will rerun when files change
|
20
|
+
box task run TestRunner --:watcher
|
21
|
+
```
|
22
|
+
|
23
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
24
|
+
|
25
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
26
|
+
## Source
|
27
|
+
|
28
|
+
A variation on Problem 7 at Project Euler [http://projecteuler.net/problem=7](http://projecteuler.net/problem=7)
|
29
|
+
|
30
|
+
## Submitting Incomplete Solutions
|
31
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Pangram
|
2
|
+
|
3
|
+
Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma,
|
4
|
+
"every letter") is a sentence using every letter of the alphabet at least once.
|
5
|
+
The best known English pangram is:
|
6
|
+
> The quick brown fox jumps over the lazy dog.
|
7
|
+
|
8
|
+
The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case
|
9
|
+
insensitive. Input will not contain non-ASCII symbols.
|
10
|
+
|
11
|
+
* * * *
|
12
|
+
|
13
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
14
|
+
|
15
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
box task run TestRunner
|
19
|
+
# Or start up a test watcher that will rerun when files change
|
20
|
+
box task run TestRunner --:watcher
|
21
|
+
```
|
22
|
+
|
23
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
24
|
+
|
25
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
26
|
+
## Source
|
27
|
+
|
28
|
+
Wikipedia [https://en.wikipedia.org/wiki/Pangram](https://en.wikipedia.org/wiki/Pangram)
|
29
|
+
|
30
|
+
## Submitting Incomplete Solutions
|
31
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Pig Latin
|
2
|
+
|
3
|
+
Implement a program that translates from English to Pig Latin.
|
4
|
+
|
5
|
+
Pig Latin is a made-up children's language that's intended to be
|
6
|
+
confusing. It obeys a few simple rules (below), but when it's spoken
|
7
|
+
quickly it's really difficult for non-children (and non-native speakers)
|
8
|
+
to understand.
|
9
|
+
|
10
|
+
- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to
|
11
|
+
the end of the word.
|
12
|
+
- **Rule 2**: If a word begins with a consonant sound, move it to the
|
13
|
+
end of the word, and then add an "ay" sound to the end of the word.
|
14
|
+
|
15
|
+
There are a few more rules for edge cases, and there are regional
|
16
|
+
variants too.
|
17
|
+
|
18
|
+
See <http://en.wikipedia.org/wiki/Pig_latin> for more details.
|
19
|
+
|
20
|
+
* * * *
|
21
|
+
|
22
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
23
|
+
|
24
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
25
|
+
|
26
|
+
```bash
|
27
|
+
box task run TestRunner
|
28
|
+
# Or start up a test watcher that will rerun when files change
|
29
|
+
box task run TestRunner --:watcher
|
30
|
+
```
|
31
|
+
|
32
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
33
|
+
|
34
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
35
|
+
## Source
|
36
|
+
|
37
|
+
The Pig Latin exercise at Test First Teaching by Ultrasaurus [https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/](https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/)
|
38
|
+
|
39
|
+
## Submitting Incomplete Solutions
|
40
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Raindrops
|
2
|
+
|
3
|
+
Convert a number to a string, the contents of which depend on the number's factors.
|
4
|
+
|
5
|
+
- If the number has 3 as a factor, output 'Pling'.
|
6
|
+
- If the number has 5 as a factor, output 'Plang'.
|
7
|
+
- If the number has 7 as a factor, output 'Plong'.
|
8
|
+
- If the number does not have 3, 5, or 7 as a factor,
|
9
|
+
just pass the number's digits straight through.
|
10
|
+
|
11
|
+
## Examples
|
12
|
+
|
13
|
+
- 28's factors are 1, 2, 4, **7**, 14, 28.
|
14
|
+
- In raindrop-speak, this would be a simple "Plong".
|
15
|
+
- 30's factors are 1, 2, **3**, **5**, 6, 10, 15, 30.
|
16
|
+
- In raindrop-speak, this would be a "PlingPlang".
|
17
|
+
- 34 has four factors: 1, 2, 17, and 34.
|
18
|
+
- In raindrop-speak, this would be "34".
|
19
|
+
|
20
|
+
* * * *
|
21
|
+
|
22
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
23
|
+
|
24
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
25
|
+
|
26
|
+
```bash
|
27
|
+
box task run TestRunner
|
28
|
+
# Or start up a test watcher that will rerun when files change
|
29
|
+
box task run TestRunner --:watcher
|
30
|
+
```
|
31
|
+
|
32
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
33
|
+
|
34
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
35
|
+
## Source
|
36
|
+
|
37
|
+
A variation on a famous interview question intended to weed out potential candidates. [http://jumpstartlab.com](http://jumpstartlab.com)
|
38
|
+
|
39
|
+
## Submitting Incomplete Solutions
|
40
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Rna Transcription
|
2
|
+
|
3
|
+
Given a DNA strand, return its RNA complement (per RNA transcription).
|
4
|
+
|
5
|
+
Both DNA and RNA strands are a sequence of nucleotides.
|
6
|
+
|
7
|
+
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**),
|
8
|
+
guanine (**G**) and thymine (**T**).
|
9
|
+
|
10
|
+
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**),
|
11
|
+
guanine (**G**) and uracil (**U**).
|
12
|
+
|
13
|
+
Given a DNA strand, its transcribed RNA strand is formed by replacing
|
14
|
+
each nucleotide with its complement:
|
15
|
+
|
16
|
+
* `G` -> `C`
|
17
|
+
* `C` -> `G`
|
18
|
+
* `T` -> `A`
|
19
|
+
* `A` -> `U`
|
20
|
+
|
21
|
+
* * * *
|
22
|
+
|
23
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
24
|
+
|
25
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
26
|
+
|
27
|
+
```bash
|
28
|
+
box task run TestRunner
|
29
|
+
# Or start up a test watcher that will rerun when files change
|
30
|
+
box task run TestRunner --:watcher
|
31
|
+
```
|
32
|
+
|
33
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
34
|
+
|
35
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
36
|
+
## Source
|
37
|
+
|
38
|
+
Rosalind [http://rosalind.info/problems/rna](http://rosalind.info/problems/rna)
|
39
|
+
|
40
|
+
## Submitting Incomplete Solutions
|
41
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Saddle Points
|
2
|
+
|
3
|
+
Detect saddle points in a matrix.
|
4
|
+
|
5
|
+
So say you have a matrix like so:
|
6
|
+
|
7
|
+
```plain
|
8
|
+
0 1 2
|
9
|
+
|---------
|
10
|
+
0 | 9 8 7
|
11
|
+
1 | 5 3 2 <--- saddle point at (1,0)
|
12
|
+
2 | 6 6 7
|
13
|
+
```
|
14
|
+
|
15
|
+
It has a saddle point at (1, 0).
|
16
|
+
|
17
|
+
It's called a "saddle point" because it is greater than or equal to
|
18
|
+
every element in its row and the less than or equal to every element in
|
19
|
+
its column.
|
20
|
+
|
21
|
+
A matrix may have zero or more saddle points.
|
22
|
+
|
23
|
+
Your code should be able to provide the (possibly empty) list of all the
|
24
|
+
saddle points for any given matrix.
|
25
|
+
|
26
|
+
Note that you may find other definitions of matrix saddle points online,
|
27
|
+
but the tests for this exercise follow the above unambiguous definition.
|
28
|
+
|
29
|
+
* * * *
|
30
|
+
|
31
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
32
|
+
|
33
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
34
|
+
|
35
|
+
```bash
|
36
|
+
box task run TestRunner
|
37
|
+
# Or start up a test watcher that will rerun when files change
|
38
|
+
box task run TestRunner --:watcher
|
39
|
+
```
|
40
|
+
|
41
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
42
|
+
|
43
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
44
|
+
## Source
|
45
|
+
|
46
|
+
J Dalbey's Programming Practice problems [http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html](http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html)
|
47
|
+
|
48
|
+
## Submitting Incomplete Solutions
|
49
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Scrabble Score
|
2
|
+
|
3
|
+
Given a word, compute the scrabble score for that word.
|
4
|
+
|
5
|
+
## Letter Values
|
6
|
+
|
7
|
+
You'll need these:
|
8
|
+
|
9
|
+
```plain
|
10
|
+
Letter Value
|
11
|
+
A, E, I, O, U, L, N, R, S, T 1
|
12
|
+
D, G 2
|
13
|
+
B, C, M, P 3
|
14
|
+
F, H, V, W, Y 4
|
15
|
+
K 5
|
16
|
+
J, X 8
|
17
|
+
Q, Z 10
|
18
|
+
```
|
19
|
+
|
20
|
+
## Examples
|
21
|
+
"cabbage" should be scored as worth 14 points:
|
22
|
+
|
23
|
+
- 3 points for C
|
24
|
+
- 1 point for A, twice
|
25
|
+
- 3 points for B, twice
|
26
|
+
- 2 points for G
|
27
|
+
- 1 point for E
|
28
|
+
|
29
|
+
And to total:
|
30
|
+
|
31
|
+
- `3 + 2*1 + 2*3 + 2 + 1`
|
32
|
+
- = `3 + 2 + 6 + 3`
|
33
|
+
- = `5 + 9`
|
34
|
+
- = 14
|
35
|
+
|
36
|
+
## Extensions
|
37
|
+
- You can play a double or a triple letter.
|
38
|
+
- You can play a double or a triple word.
|
39
|
+
|
40
|
+
* * * *
|
41
|
+
|
42
|
+
To run the code in this exercise, you will only need to have [CommandBox CLI installed](https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html). This binary runs CFML code from the command line.
|
43
|
+
|
44
|
+
To run the tests, `cd` into the exercise folder and run the following:
|
45
|
+
|
46
|
+
```bash
|
47
|
+
box task run TestRunner
|
48
|
+
# Or start up a test watcher that will rerun when files change
|
49
|
+
box task run TestRunner --:watcher
|
50
|
+
```
|
51
|
+
|
52
|
+
The tests leverage a library called TestBox which supports xUnit and BDD style of testing. All test suites will be written in the [BDD style](https://testbox.ortusbooks.com/content/primers/bdd/specs.html) which uses closures to define test specs. You won't need to worry about installing TestBox. The CLI test runner will take care of that for you. You just need to be connected to the internet the first time you run it. You can read more about it here:
|
53
|
+
|
54
|
+
[https://testbox.ortusbooks.com/content/](https://testbox.ortusbooks.com/content/)
|
55
|
+
## Source
|
56
|
+
|
57
|
+
Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup)
|
58
|
+
|
59
|
+
## Submitting Incomplete Solutions
|
60
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|