trackler 2.2.1.13 → 2.2.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/change/canonical-data.json +8 -1
  4. data/tracks/csharp/config.json +25 -26
  5. data/tracks/csharp/docs/SNIPPET.txt +7 -0
  6. data/tracks/csharp/exercises/house/Example.cs +5 -5
  7. data/tracks/csharp/exercises/house/House.cs +6 -1
  8. data/tracks/csharp/exercises/house/HouseTest.cs +208 -5
  9. data/tracks/csharp/exercises/phone-number/Example.cs +2 -1
  10. data/tracks/csharp/exercises/phone-number/PhoneNumberTest.cs +8 -7
  11. data/tracks/csharp/exercises/rna-transcription/Example.cs +2 -1
  12. data/tracks/csharp/exercises/rna-transcription/RnaTranscriptionTest.cs +4 -3
  13. data/tracks/csharp/exercises/say/SayTest.cs +20 -24
  14. data/tracks/csharp/exercises/sieve/Example.cs +6 -0
  15. data/tracks/csharp/exercises/sieve/SieveTest.cs +25 -17
  16. data/tracks/csharp/exercises/space-age/SpaceAgeTest.cs +19 -24
  17. data/tracks/csharp/exercises/sum-of-multiples/Example.cs +1 -1
  18. data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiples.cs +1 -1
  19. data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +48 -16
  20. data/tracks/csharp/generators/Exercises/House.cs +16 -0
  21. data/tracks/csharp/generators/Exercises/PhoneNumber.cs +3 -1
  22. data/tracks/csharp/generators/Exercises/RnaTranscription.cs +11 -1
  23. data/tracks/csharp/generators/Exercises/Say.cs +22 -0
  24. data/tracks/csharp/generators/Exercises/Sieve.cs +17 -0
  25. data/tracks/csharp/generators/Exercises/SpaceAge.cs +25 -0
  26. data/tracks/csharp/generators/Exercises/SumOfMultiples.cs +22 -0
  27. data/tracks/csharp/generators/Output/ValueFormatter.cs +4 -0
  28. data/tracks/dart/docs/ABOUT.md +21 -0
  29. data/tracks/ecmascript/README.md +1 -1
  30. data/tracks/ecmascript/config.json +15 -0
  31. data/tracks/ecmascript/exercises/proverb/README.md +63 -0
  32. data/tracks/ecmascript/exercises/proverb/example.js +23 -0
  33. data/tracks/ecmascript/exercises/proverb/package.json +69 -0
  34. data/tracks/ecmascript/exercises/proverb/proverb.spec.js +70 -0
  35. data/tracks/go/config.json +226 -226
  36. data/tracks/groovy/config.json +11 -0
  37. data/tracks/groovy/exercises/two-fer/Example.groovy +6 -0
  38. data/tracks/groovy/exercises/two-fer/README.md +62 -0
  39. data/tracks/groovy/exercises/two-fer/TwoFer.groovy +6 -0
  40. data/tracks/groovy/exercises/two-fer/TwoFerSpec.groovy +24 -0
  41. data/tracks/java/.travis.yml +2 -2
  42. data/tracks/java/bin/journey-test.sh +44 -1
  43. data/tracks/java/bin/run-journey-test-from-ci.sh +28 -0
  44. data/tracks/java/{docs/EXERCISE_README_INSERT.md → config/exercise-readme-insert.md} +0 -0
  45. data/tracks/java/exercises/bank-account/{HINTS.md → .meta/hints.md} +0 -0
  46. data/tracks/java/exercises/change/src/test/java/ChangeCalculatorTest.java +27 -2
  47. data/tracks/java/exercises/clock/{HINTS.md → .meta/hints.md} +0 -0
  48. data/tracks/java/exercises/hamming/{HINTS.md → .meta/hints.md} +0 -0
  49. data/tracks/java/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
  50. data/tracks/java/exercises/isogram/{HINTS.md → .meta/hints.md} +0 -0
  51. data/tracks/java/exercises/list-ops/{HINTS.md → .meta/hints.md} +0 -0
  52. data/tracks/java/exercises/pig-latin/src/example/java/PigLatinTranslator.java +17 -20
  53. data/tracks/java/exercises/simple-cipher/{HINTS.md → .meta/hints.md} +0 -0
  54. data/tracks/java/exercises/two-fer/{HINTS.md → .meta/hints.md} +0 -0
  55. data/tracks/kotlin/{docs/EXERCISE_README_INSERT.md → config/exercise-readme-insert.md} +0 -0
  56. data/tracks/kotlin/exercises/accumulate/README.md +1 -4
  57. data/tracks/kotlin/exercises/acronym/README.md +1 -1
  58. data/tracks/kotlin/exercises/all-your-base/README.md +1 -1
  59. data/tracks/kotlin/exercises/allergies/README.md +1 -1
  60. data/tracks/kotlin/exercises/anagram/README.md +1 -1
  61. data/tracks/kotlin/exercises/atbash-cipher/README.md +1 -1
  62. data/tracks/kotlin/exercises/bank-account/README.md +1 -1
  63. data/tracks/kotlin/exercises/beer-song/README.md +1 -1
  64. data/tracks/kotlin/exercises/binary-search/README.md +1 -1
  65. data/tracks/kotlin/exercises/binary/README.md +1 -1
  66. data/tracks/kotlin/exercises/bob/README.md +1 -1
  67. data/tracks/kotlin/exercises/bracket-push/README.md +1 -1
  68. data/tracks/kotlin/exercises/change/README.md +1 -1
  69. data/tracks/kotlin/exercises/clock/README.md +1 -1
  70. data/tracks/kotlin/exercises/collatz-conjecture/README.md +1 -1
  71. data/tracks/kotlin/exercises/complex-numbers/README.md +1 -1
  72. data/tracks/kotlin/exercises/diamond/README.md +1 -1
  73. data/tracks/kotlin/exercises/difference-of-squares/README.md +1 -1
  74. data/tracks/kotlin/exercises/etl/README.md +1 -1
  75. data/tracks/kotlin/exercises/flatten-array/README.md +1 -1
  76. data/tracks/kotlin/exercises/gigasecond/README.md +1 -1
  77. data/tracks/kotlin/exercises/grade-school/README.md +1 -1
  78. data/tracks/kotlin/exercises/grains/README.md +1 -1
  79. data/tracks/kotlin/exercises/hamming/README.md +1 -1
  80. data/tracks/kotlin/exercises/hello-world/README.md +1 -1
  81. data/tracks/kotlin/exercises/hexadecimal/README.md +1 -1
  82. data/tracks/kotlin/exercises/isogram/README.md +1 -1
  83. data/tracks/kotlin/exercises/largest-series-product/README.md +1 -1
  84. data/tracks/kotlin/exercises/leap/README.md +1 -1
  85. data/tracks/kotlin/exercises/linked-list/README.md +1 -1
  86. data/tracks/kotlin/exercises/list-ops/{HINTS.md → .meta/hints.md} +0 -0
  87. data/tracks/kotlin/exercises/list-ops/README.md +1 -1
  88. data/tracks/kotlin/exercises/luhn/README.md +1 -1
  89. data/tracks/kotlin/exercises/minesweeper/README.md +1 -1
  90. data/tracks/kotlin/exercises/nth-prime/README.md +1 -1
  91. data/tracks/kotlin/exercises/nucleotide-count/README.md +1 -1
  92. data/tracks/kotlin/exercises/pangram/README.md +1 -1
  93. data/tracks/kotlin/exercises/pascals-triangle/README.md +1 -1
  94. data/tracks/kotlin/exercises/perfect-numbers/README.md +1 -1
  95. data/tracks/kotlin/exercises/phone-number/README.md +1 -1
  96. data/tracks/kotlin/exercises/pig-latin/README.md +1 -1
  97. data/tracks/kotlin/exercises/prime-factors/README.md +1 -1
  98. data/tracks/kotlin/exercises/raindrops/README.md +1 -1
  99. data/tracks/kotlin/exercises/react/README.md +1 -1
  100. data/tracks/kotlin/exercises/rna-transcription/README.md +1 -1
  101. data/tracks/kotlin/exercises/robot-name/README.md +1 -1
  102. data/tracks/kotlin/exercises/robot-simulator/README.md +1 -1
  103. data/tracks/kotlin/exercises/roman-numerals/README.md +1 -1
  104. data/tracks/kotlin/exercises/saddle-points/README.md +1 -1
  105. data/tracks/kotlin/exercises/scrabble-score/README.md +1 -1
  106. data/tracks/kotlin/exercises/secret-handshake/README.md +1 -1
  107. data/tracks/kotlin/exercises/series/README.md +1 -1
  108. data/tracks/kotlin/exercises/sieve/README.md +1 -1
  109. data/tracks/kotlin/exercises/simple-cipher/README.md +2 -2
  110. data/tracks/kotlin/exercises/space-age/README.md +3 -2
  111. data/tracks/kotlin/exercises/spiral-matrix/README.md +1 -1
  112. data/tracks/kotlin/exercises/strain/README.md +1 -1
  113. data/tracks/kotlin/exercises/sublist/README.md +1 -1
  114. data/tracks/kotlin/exercises/sum-of-multiples/README.md +1 -1
  115. data/tracks/kotlin/exercises/triangle/README.md +1 -1
  116. data/tracks/kotlin/exercises/word-count/README.md +1 -1
  117. data/tracks/pony/exercises/atbash-cipher/example.pony +4 -3
  118. data/tracks/pony/exercises/beer-song/example.pony +10 -9
  119. data/tracks/pony/exercises/bob/example.pony +1 -1
  120. data/tracks/pony/exercises/difference-of-squares/example.pony +2 -2
  121. data/tracks/pony/exercises/hamming/example.pony +1 -1
  122. data/tracks/pony/exercises/hamming/test.pony +2 -2
  123. data/tracks/pony/exercises/leap/example.pony +1 -1
  124. data/tracks/pony/exercises/pascals-triangle/example.pony +2 -2
  125. data/tracks/pony/exercises/rna-transcription/test.pony +2 -2
  126. data/tracks/pony/exercises/roman-numerals/test.pony +2 -2
  127. data/tracks/python/config.json +22 -0
  128. data/tracks/python/docs/ABOUT.md +11 -3
  129. data/tracks/python/exercises/collatz-conjecture/README.md +61 -0
  130. data/tracks/python/exercises/collatz-conjecture/collatz_conjecture.py +2 -0
  131. data/tracks/python/exercises/collatz-conjecture/collatz_conjecture_test.py +32 -0
  132. data/tracks/python/exercises/collatz-conjecture/example.py +17 -0
  133. data/tracks/python/exercises/isogram/isogram.py +1 -1
  134. data/tracks/python/exercises/isogram/isogram_test.py +3 -0
  135. data/tracks/python/exercises/scale-generator/example.py +2 -0
  136. data/tracks/python/exercises/scale-generator/scale_generator_test.py +4 -0
  137. data/tracks/python/exercises/two-fer/README.md +29 -0
  138. data/tracks/python/exercises/two-fer/example.py +5 -0
  139. data/tracks/python/exercises/two-fer/two_fer.py +2 -0
  140. data/tracks/python/exercises/two-fer/two_fer_test.py +18 -0
  141. data/tracks/r/config/maintainers.json +2 -2
  142. data/tracks/ruby/config.json +2 -1
  143. data/tracks/scala/exercises/minesweeper/src/test/scala/MinesweeperTest.scala +85 -36
  144. data/tracks/scala/testgen/src/main/scala/MinesweeperTestGenerator.scala +15 -0
  145. data/tracks/vimscript/README.md +1 -1
  146. metadata +37 -13
@@ -0,0 +1,16 @@
1
+ using Generators.Input;
2
+
3
+ namespace Generators.Exercises
4
+ {
5
+ public class House : Exercise
6
+ {
7
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
8
+ {
9
+ foreach (var canonicalDataCase in CanonicalData.Cases)
10
+ {
11
+ canonicalDataCase.UseVariableForExpected = true;
12
+ canonicalDataCase.Expected = canonicalDataCase.Expected.ConvertMultiLineString();
13
+ }
14
+ }
15
+ }
16
+ }
@@ -1,4 +1,5 @@
1
- using Generators.Input;
1
+ using System;
2
+ using Generators.Input;
2
3
 
3
4
  namespace Generators.Exercises
4
5
  {
@@ -9,6 +10,7 @@ protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
10
  foreach (var canonicalDataCase in CanonicalData.Cases)
10
11
  {
11
12
  canonicalDataCase.UseVariablesForInput = true;
13
+ canonicalDataCase.ExceptionThrown = canonicalDataCase.Expected is null ? typeof(ArgumentException) : null;
12
14
  }
13
15
  }
14
16
  }
@@ -1,6 +1,16 @@
1
- namespace Generators.Exercises
1
+ using System;
2
+ using Generators.Input;
3
+
4
+ namespace Generators.Exercises
2
5
  {
3
6
  public class RnaTranscription : Exercise
4
7
  {
8
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
+ {
10
+ foreach (var canonicalDataCase in CanonicalData.Cases)
11
+ {
12
+ canonicalDataCase.ExceptionThrown = canonicalDataCase.Expected is null ? typeof(ArgumentException) : null;
13
+ }
14
+ }
5
15
  }
6
16
  }
@@ -0,0 +1,22 @@
1
+ using System;
2
+ using Generators.Input;
3
+
4
+ namespace Generators.Exercises
5
+ {
6
+ public class Say : Exercise
7
+ {
8
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
+ {
10
+ foreach (var canonicalDataCase in CanonicalData.Cases)
11
+ {
12
+ // Rename the property to avoid it being considered a constructor
13
+ if (canonicalDataCase.Property == "say")
14
+ {
15
+ canonicalDataCase.Property = "in_english";
16
+ }
17
+
18
+ canonicalDataCase.ExceptionThrown = canonicalDataCase.Expected is long ? typeof(ArgumentOutOfRangeException) : null;
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,17 @@
1
+ using System;
2
+ using Generators.Input;
3
+
4
+ namespace Generators.Exercises
5
+ {
6
+ public class Sieve : Exercise
7
+ {
8
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
+ {
10
+ foreach (var canonicalDataCase in CanonicalData.Cases)
11
+ {
12
+ canonicalDataCase.UseVariableForExpected = true;
13
+ canonicalDataCase.ExceptionThrown = (long)canonicalDataCase.Input["limit"] < 2 ? typeof(ArgumentOutOfRangeException) : null;
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,25 @@
1
+ using System.Collections.Generic;
2
+ using Generators.Input;
3
+
4
+ namespace Generators.Exercises
5
+ {
6
+ public class SpaceAge : Exercise
7
+ {
8
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
9
+ {
10
+ foreach (var canonicalDataCase in CanonicalData.Cases)
11
+ {
12
+ canonicalDataCase.TestedMethodType = TestedMethodType.Instance;
13
+
14
+ canonicalDataCase.ConstructorInput = new Dictionary<string, object>
15
+ {
16
+ ["seconds"] = canonicalDataCase.Properties["seconds"]
17
+ };
18
+ canonicalDataCase.Input.Remove("seconds");
19
+
20
+ canonicalDataCase.Property = $"On_{canonicalDataCase.Input["planet"]}";
21
+ canonicalDataCase.Input.Remove("planet");
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,22 @@
1
+ using System;
2
+ using System.Linq;
3
+ using Generators.Input;
4
+
5
+ namespace Generators.Exercises
6
+ {
7
+ public class SumOfMultiples : Exercise
8
+ {
9
+ protected override void UpdateCanonicalData(CanonicalData canonicalData)
10
+ {
11
+ foreach (var canonicalDataCase in CanonicalData.Cases)
12
+ {
13
+ var hasFactors = canonicalDataCase.Input["factors"].ConvertToEnumerable<long>().Any();
14
+
15
+ if (!hasFactors)
16
+ {
17
+ canonicalDataCase.Input["factors"] = Enumerable.Empty<int>();
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
@@ -16,6 +16,8 @@ public static object Format(object val)
16
16
  return string.Join(", ", dict.Values.Select(Format));
17
17
  case IDictionary<char, int> dict:
18
18
  return $"new Dictionary<char, int> {{ {string.Join(", ", dict.Keys.Select(key => $"[{Format(key)}] = {Format(dict[key])}"))} }}";
19
+ case IDictionary<string, int> dict:
20
+ return $"new Dictionary<string, int> {{ {string.Join(", ", dict.Keys.Select(key => $"[{Format(key)}] = {Format(dict[key])}"))} }}";
19
21
  case Enum enumeration:
20
22
  return $"{enumeration.GetType().Name}.{enumeration}";
21
23
  case JArray jArray:
@@ -52,6 +54,8 @@ public static string[] FormatVariable(object val, string name)
52
54
  return FormatMultiLineEnumerable(strings, name);
53
55
  case IDictionary<char, int> dict:
54
56
  return FormatMultiLineEnumerable(dict.Keys.Select((key, i) => $"[{Format(key)}] = {Format(dict[key])}" + (i < dict.Keys.Count - 1 ? "," : "")), name, "new Dictionary<char, int>");
57
+ case IDictionary<string, int> dict:
58
+ return FormatMultiLineEnumerable(dict.Keys.Select((key, i) => $"[{Format(key)}] = {Format(dict[key])}" + (i < dict.Keys.Count - 1 ? "," : "")), name, "new Dictionary<string, int>");
55
59
  default:
56
60
  return new[] {$"var {name} = {Format(val)};"};
57
61
  }
@@ -0,0 +1,21 @@
1
+ Dart brings object-oriented and typing together with the flexibility that JavaScript is known for. It is designed to simplify common programming tasks. This has made the biggest impact in regards to web development via AngularDart which has the Angular framework implemented using Dart.
2
+
3
+ To dig deeper into Dart, [click here](https://en.wikipedia.org/wiki/Dart_(programming_language)).
4
+
5
+ The primary concepts baked into the making of the language were:
6
+
7
+ - It is simple, object-oriented, and familiar.
8
+ * The language derives its syntax from Java and JavaScript; as well as Smalltalk.
9
+ - It provides tools out of the box to help development efforts.
10
+ - It has strong support via many standard libraries.
11
+ - It is architecture-neutral and portable.
12
+ - It executes with high performance for practical applications and not just benchmarks.
13
+
14
+ Standardization:
15
+
16
+ If you need to write a web/enterprise app, or you need data persistence or you need to do cryptography, no problem!
17
+ Dart is all you require!
18
+
19
+ There is a rich ecosystem springing up around Dart because the standard (built-in) libraries can be supplemented by open source libraries found on [Pub](https://pub.dartlang.org).
20
+
21
+ And the community has a voice in the development of the language since there are many standard tools/practices that extend the [Dart specification](https://www.dartlang.org/guides/language/spec), thanks to the [Dart Enhancement Proposals](https://github.com/dart-lang/dart_enhancement_proposals) (DEP)!
@@ -34,5 +34,5 @@ Pass the exercise name to make script to run the tests for a specific exercise:
34
34
 
35
35
  ## Contributing Guide
36
36
 
37
- Please see the [contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#the-exercise-data)
37
+ For an in-depth discussion of how exercism language tracks and exercises work,please see the [contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#the-exercise-data)
38
38
 
@@ -665,6 +665,21 @@
665
665
  "Integers"
666
666
  ]
667
667
  },
668
+ {
669
+ "uuid": "5626f5b6-207b-458b-92b6-eff2cadb240a",
670
+ "slug": "proverb",
671
+ "core": false,
672
+ "unlocked_by": "bob",
673
+ "difficulty": 4,
674
+ "topics": [
675
+ "Control flow (conditionals)",
676
+ "Control flow (loops)",
677
+ "Arrays",
678
+ "Strings",
679
+ "Text formatting",
680
+ "Optional values"
681
+ ]
682
+ },
668
683
  {
669
684
  "uuid": "1a6c4a3b-d5db-4a5a-b123-66cf085defe6",
670
685
  "slug": "flatten-array",
@@ -0,0 +1,63 @@
1
+ # Proverb
2
+
3
+ "For want of a horseshoe nail, a kingdom was lost" is a popular proverb. There are may variations
4
+ of this proverb and these variations can be chained together. For example:
5
+
6
+ > For want of a nail the shoe was lost.
7
+ > For want of a shoe the horse was lost.
8
+ > For want of a horse the rider was lost.
9
+ > For want of a rider the message was lost.
10
+ > For want of a message the battle was lost.
11
+ > For want of a battle the kingdom was lost.
12
+ > And all for the want of a horseshoe nail.
13
+
14
+ Given two or more nouns, construct the full chain of events for the above proverb.
15
+ For example, given the nouns "nail", "shoe" and "horse", your program should output the text:
16
+
17
+ >For want of a nail the shoe was lost.
18
+ >For want of a shoe the horse was lost.
19
+ >And all for the want of a nail.
20
+
21
+ Given the nouns, "nail", "shoe", "horse", "rider", "message", and a qualifier "horseshoe", your program should output:
22
+
23
+ > For want of a nail the shoe was lost.
24
+ > For want of a shoe the horse was lost.
25
+ > For want of a horse the rider was lost.
26
+ > For want of a rider the message was lost.
27
+ > And all for the want of a horseshoe nail.
28
+
29
+
30
+ ## Setup
31
+
32
+ Go through the setup instructions for EcmaScript to
33
+ install the necessary dependencies:
34
+
35
+ http://exercism.io/languages/ecmascript
36
+
37
+ ## Requirements
38
+
39
+ Install assignment dependencies:
40
+
41
+ ```bash
42
+ $ npm install
43
+ ```
44
+
45
+ ## Making the test suite pass
46
+
47
+ Execute the tests with:
48
+
49
+ ```bash
50
+ $ npm test
51
+ ```
52
+
53
+ In the test suites all tests but the first have been skipped.
54
+
55
+ Once you get a test passing, you can enable the next one by
56
+ changing `xtest` to `test`.
57
+
58
+ ## Source
59
+
60
+ Wikipedia [http://en.wikipedia.org/wiki/For_Want_of_a_Nail](http://en.wikipedia.org/wiki/For_Want_of_a_Nail)
61
+
62
+ ## Submitting Incomplete Solutions
63
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -0,0 +1,23 @@
1
+ const lastArgIsOptions = (args) => {
2
+ const last = args[args.length - 1];
3
+ return typeof last === 'object';
4
+ };
5
+
6
+ const conclusion = (firstArg, qualifier = '') => `And all for the want of a ${qualifier}${firstArg}.`;
7
+
8
+ const proverb = (...args) => {
9
+ let options = {};
10
+ if (lastArgIsOptions(args)) {
11
+ options = args.pop();
12
+ }
13
+
14
+ const allExceptLastArg = args.slice(0, -1);
15
+ const chainOfEvents = allExceptLastArg.map((arg, index) => `For want of a ${arg} the ${args[index + 1]} was lost.`);
16
+
17
+ const qualifier = options.qualifier ? `${options.qualifier} ` : options.qualifier;
18
+ chainOfEvents.push(conclusion(args[0], qualifier));
19
+
20
+ return chainOfEvents.join('\n');
21
+ };
22
+
23
+ export default proverb;
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "xecmascript",
3
+ "version": "0.0.0",
4
+ "description": "Exercism exercises in ECMAScript 6.",
5
+ "author": "Katrina Owen",
6
+ "private": true,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/exercism/xecmascript"
10
+ },
11
+ "devDependencies": {
12
+ "babel-jest": "^20.0.3",
13
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
14
+ "babel-preset-env": "^1.4.0",
15
+ "eslint": "^3.19.0",
16
+ "eslint-config-airbnb": "^15.0.1",
17
+ "eslint-plugin-import": "^2.2.0",
18
+ "eslint-plugin-jsx-a11y": "^5.0.1",
19
+ "eslint-plugin-react": "^7.0.1",
20
+ "jest": "^20.0.4"
21
+ },
22
+ "jest": {
23
+ "modulePathIgnorePatterns": [
24
+ "package.json"
25
+ ]
26
+ },
27
+ "babel": {
28
+ "presets": [
29
+ "env"
30
+ ],
31
+ "plugins": [
32
+ [
33
+ "babel-plugin-transform-builtin-extend",
34
+ {
35
+ "globals": [
36
+ "Error"
37
+ ]
38
+ }
39
+ ],
40
+ ["transform-regenerator"]
41
+ ]
42
+ },
43
+ "scripts": {
44
+ "test": "jest --no-cache ./*",
45
+ "watch": "jest --no-cache --watch ./*",
46
+ "lint": "eslint .",
47
+ "lint-test": "eslint . && jest --no-cache ./* "
48
+ },
49
+ "eslintConfig": {
50
+ "parserOptions": {
51
+ "ecmaVersion": 6,
52
+ "sourceType": "module"
53
+ },
54
+ "env": {
55
+ "es6": true,
56
+ "node": true,
57
+ "jest": true
58
+ },
59
+ "extends": "airbnb",
60
+ "rules": {
61
+ "import/no-unresolved": "off",
62
+ "import/extensions": "off"
63
+ }
64
+ },
65
+ "licenses": [
66
+ "MIT"
67
+ ],
68
+ "dependencies": {}
69
+ }
@@ -0,0 +1,70 @@
1
+ import proverb from './proverb';
2
+
3
+ describe('Proverb Test Suite', () => {
4
+ test('a single consequence', () => {
5
+ const result = proverb('nail', 'shoe');
6
+
7
+ expect(result).toEqual(
8
+ `For want of a nail the shoe was lost.
9
+ And all for the want of a nail.`);
10
+ });
11
+
12
+ xtest('a short chain of consequences', () => {
13
+ const result = proverb('nail', 'shoe', 'horse');
14
+
15
+ expect(result).toEqual(
16
+ `For want of a nail the shoe was lost.
17
+ For want of a shoe the horse was lost.
18
+ And all for the want of a nail.`);
19
+ });
20
+
21
+ xtest('a longer chain of consequences', () => {
22
+ const result = proverb('nail', 'shoe', 'horse', 'rider');
23
+ expect(result).toEqual(
24
+ `For want of a nail the shoe was lost.
25
+ For want of a shoe the horse was lost.
26
+ For want of a horse the rider was lost.
27
+ And all for the want of a nail.`);
28
+ });
29
+
30
+ xtest('proverb function does not hard code the rhyme dictionary', () => {
31
+ const result = proverb('key', 'value');
32
+
33
+ expect(result).toEqual(
34
+ `For want of a key the value was lost.
35
+ And all for the want of a key.`);
36
+ });
37
+
38
+ xtest('the whole proveb', () => {
39
+ const result = proverb('nail', 'shoe', 'horse', 'rider',
40
+ 'message', 'battle', 'kingdom');
41
+
42
+ expect(result).toEqual(
43
+ `For want of a nail the shoe was lost.
44
+ For want of a shoe the horse was lost.
45
+ For want of a horse the rider was lost.
46
+ For want of a rider the message was lost.
47
+ For want of a message the battle was lost.
48
+ For want of a battle the kingdom was lost.
49
+ And all for the want of a nail.`);
50
+ });
51
+
52
+ xtest('proverb is the same each time', () => {
53
+ expect(proverb('nail', 'shoe')).toEqual(proverb('nail', 'shoe'));
54
+ });
55
+
56
+ xtest('the use of an optional qualifier in the final consequence', () => {
57
+ const result = proverb('nail', 'shoe', 'horse', 'rider',
58
+ 'message', 'battle', 'kingdom',
59
+ { qualifier: 'horseshoe' });
60
+
61
+ expect(result).toEqual(
62
+ `For want of a nail the shoe was lost.
63
+ For want of a shoe the horse was lost.
64
+ For want of a horse the rider was lost.
65
+ For want of a rider the message was lost.
66
+ For want of a message the battle was lost.
67
+ For want of a battle the kingdom was lost.
68
+ And all for the want of a horseshoe nail.`);
69
+ });
70
+ });
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "uuid": "19957346-dedf-441e-85ea-656cac0d96d8",
14
14
  "slug": "hello-world",
15
- "core": false,
15
+ "core": true,
16
16
  "unlocked_by": null,
17
17
  "difficulty": 1,
18
18
  "topics": [
@@ -20,79 +20,80 @@
20
20
  ]
21
21
  },
22
22
  {
23
- "uuid": "fee57b09-2b67-4483-a2e5-3dfec0568b15",
24
- "slug": "leap",
25
- "core": false,
26
- "unlocked_by": null,
23
+ "uuid": "52582415-8f7f-4ac5-857f-5c160ec48134",
24
+ "slug": "hamming",
25
+ "core": true,
26
+ "unlocked_by":null,
27
27
  "difficulty": 1,
28
28
  "topics": [
29
- "Control-flow (conditionals)",
30
- "Booleans",
31
- "Integers",
32
- "Logic"
29
+ "Control-flow (loops)",
30
+ "Equality",
31
+ "Strings"
33
32
  ]
34
33
  },
35
34
  {
36
- "uuid": "7d2de21e-bf67-495e-8d90-05e1a35d5b99",
37
- "slug": "clock",
38
- "core": false,
35
+ "uuid": "2f51e32a-9b1f-4100-9eec-517115c858e9",
36
+ "slug": "raindrops",
37
+ "core": true,
39
38
  "unlocked_by": null,
40
- "difficulty": 3,
39
+ "difficulty": 1,
41
40
  "topics": [
42
- "Time",
43
- "Mathematics",
44
- "Text formatting",
45
- "Equality"
41
+ "Control-flow (conditionals)",
42
+ "Strings",
43
+ "Filtering"
46
44
  ]
47
45
  },
48
46
  {
49
- "uuid": "ea390e58-6ac5-4219-89bb-648852712a6a",
50
- "slug": "gigasecond",
51
- "core": false,
47
+ "uuid": "20cbd8f9-f8e3-4767-a0f5-94810ba3f902",
48
+ "slug": "scrabble-score",
49
+ "core": true,
52
50
  "unlocked_by": null,
53
51
  "difficulty": 1,
54
52
  "topics": [
55
- "Time"
53
+ "Control-flow (loops)",
54
+ "Maps",
55
+ "Strings"
56
56
  ]
57
57
  },
58
58
  {
59
- "uuid": "52582415-8f7f-4ac5-857f-5c160ec48134",
60
- "slug": "hamming",
61
- "core": false,
59
+ "uuid": "73da448c-33b7-4565-ab48-1de5020d65ab",
60
+ "slug": "etl",
61
+ "core": true,
62
62
  "unlocked_by": null,
63
63
  "difficulty": 1,
64
64
  "topics": [
65
65
  "Control-flow (loops)",
66
- "Equality",
67
- "Strings"
66
+ "Maps",
67
+ "Transforming"
68
68
  ]
69
69
  },
70
70
  {
71
- "uuid": "2f51e32a-9b1f-4100-9eec-517115c858e9",
72
- "slug": "raindrops",
73
- "core": false,
71
+ "uuid": "19628c8a-a89f-457e-9526-3d400024a927",
72
+ "slug": "difference-of-squares",
73
+ "core": true,
74
74
  "unlocked_by": null,
75
- "difficulty": 1,
75
+ "difficulty": 2,
76
76
  "topics": [
77
- "Control-flow (conditionals)",
78
- "Strings",
79
- "Filtering"
77
+ "Algorithms",
78
+ "Mathematics"
80
79
  ]
81
80
  },
82
81
  {
83
- "uuid": "fb03948c-11e8-440d-9a5d-979396451270",
84
- "slug": "accumulate",
85
- "core": false,
82
+ "uuid": "7fbb0d9d-71d1-4654-8ca0-bb07ddbe6cb5",
83
+ "slug": "strain",
84
+ "core": true,
86
85
  "unlocked_by": null,
87
- "difficulty": 1,
86
+ "difficulty": 2,
88
87
  "topics": [
89
- "Lists"
88
+ "Filtering",
89
+ "Control-flow (loops)",
90
+ "Arrays"
90
91
  ]
91
92
  },
92
93
  {
93
94
  "uuid": "b39d9e79-dee0-4c70-a6c3-114bee8083f2",
94
95
  "slug": "acronym",
95
- "core": false,
96
+ "core": true,
96
97
  "unlocked_by": null,
97
98
  "difficulty": 3,
98
99
  "topics": [
@@ -102,125 +103,133 @@
102
103
  ]
103
104
  },
104
105
  {
105
- "uuid": "d14c6283-e57c-472c-8181-87f82d9088dd",
106
- "slug": "pangram",
107
- "core": false,
106
+ "uuid": "6769557a-33fa-4257-adbf-e66dc8c06f85",
107
+ "slug": "triangle",
108
+ "core": true,
108
109
  "unlocked_by": null,
109
- "difficulty": 2,
110
+ "difficulty": 3,
110
111
  "topics": [
111
- "Control-flow (loops)",
112
- "Strings"
112
+ "Control-flow (conditionals)",
113
+ "Booleans",
114
+ "Logic"
113
115
  ]
114
116
  },
115
117
  {
116
- "uuid": "efdf07a1-e329-4d0f-90a1-374b9b8af748",
117
- "slug": "bob",
118
- "core": false,
118
+ "uuid": "7d2de21e-bf67-495e-8d90-05e1a35d5b99",
119
+ "slug": "clock",
120
+ "core": true,
119
121
  "unlocked_by": null,
120
- "difficulty": 2,
122
+ "difficulty": 3,
121
123
  "topics": [
122
- "Control-flow (conditionals)",
123
- "Strings"
124
+ "Time",
125
+ "Mathematics",
126
+ "Text formatting",
127
+ "Equality"
124
128
  ]
125
129
  },
126
130
  {
127
- "uuid": "6769557a-33fa-4257-adbf-e66dc8c06f85",
128
- "slug": "triangle",
129
- "core": false,
131
+ "uuid": "b765fde9-84b4-44cc-bdf1-f66ac1ab8e2c",
132
+ "slug": "word-count",
133
+ "core": true,
130
134
  "unlocked_by": null,
131
135
  "difficulty": 3,
132
136
  "topics": [
133
- "Control-flow (conditionals)",
134
- "Booleans",
135
- "Logic"
137
+ "Strings",
138
+ "Sorting"
136
139
  ]
137
140
  },
138
141
  {
139
- "uuid": "75b6e2e8-1e20-4f53-b7c5-e32f9f7eea58",
140
- "slug": "twelve-days",
141
- "core": false,
142
+ "uuid": "bf366b19-63bf-4a75-9a35-08b881af6951",
143
+ "slug": "parallel-letter-frequency",
144
+ "core": true,
142
145
  "unlocked_by": null,
143
- "difficulty": 4,
146
+ "difficulty": 3,
144
147
  "topics": [
145
- "Strings",
146
- "Sequences",
147
- "Algorithms",
148
- "Pattern recognition",
149
- "Text formatting"
148
+ "Concurrency"
150
149
  ]
151
150
  },
152
151
  {
153
- "uuid": "19628c8a-a89f-457e-9526-3d400024a927",
154
- "slug": "difference-of-squares",
155
- "core": false,
152
+ "uuid": "b4f6b08b-a132-447b-b447-66bf37ab20c6",
153
+ "slug": "grains",
154
+ "core": true,
156
155
  "unlocked_by": null,
157
156
  "difficulty": 2,
158
157
  "topics": [
159
- "Algorithms",
160
- "Mathematics"
158
+ "Control-flow (if-else statements)",
159
+ "Bitwise operations",
160
+ "Mathematics",
161
+ "Type conversion",
162
+ "Integers"
161
163
  ]
162
164
  },
163
165
  {
164
- "uuid": "cd05b63b-df20-4c8d-8743-53033acf7696",
165
- "slug": "error-handling",
166
- "core": false,
166
+ "uuid": "2c5fb577-a9ce-4c4c-8fc8-fffb38d020d6",
167
+ "slug": "series",
168
+ "core": true,
167
169
  "unlocked_by": null,
168
- "difficulty": 5,
170
+ "difficulty": 3,
169
171
  "topics": [
170
- "Exception handling"
172
+ "Strings",
173
+ "Arrays",
174
+ "Refactoring"
171
175
  ]
172
176
  },
173
177
  {
174
- "uuid": "9a1870e0-dce7-496e-9521-2f2b606ac6c5",
175
- "slug": "secret-handshake",
176
- "core": false,
178
+ "uuid": "31c77516-6702-417e-9c6e-19c7e965d513",
179
+ "slug": "binary-search",
180
+ "core": true,
177
181
  "unlocked_by": null,
178
182
  "difficulty": 5,
179
183
  "topics": [
180
- "Bitwise operations",
184
+ "Algorithms",
181
185
  "Arrays",
182
- "Integers"
186
+ "Searching",
187
+ "Sorting"
183
188
  ]
184
189
  },
185
190
  {
186
- "uuid": "11008fb0-4ef9-4aff-befb-c56f4084f96e",
187
- "slug": "house",
188
- "core": false,
191
+ "uuid": "75b6e2e8-1e20-4f53-b7c5-e32f9f7eea58",
192
+ "slug": "twelve-days",
193
+ "core": true,
189
194
  "unlocked_by": null,
190
195
  "difficulty": 4,
191
196
  "topics": [
192
197
  "Strings",
193
- "Text formatting",
194
- "Recursion"
198
+ "Sequences",
199
+ "Algorithms",
200
+ "Pattern recognition",
201
+ "Text formatting"
195
202
  ]
196
203
  },
197
204
  {
198
- "uuid": "92e2a192-5ee9-422a-8699-c231a7136b10",
199
- "slug": "pascals-triangle",
200
- "core": false,
205
+ "uuid": "62aa3d20-65d8-440f-9d08-48bbc823f4fe",
206
+ "slug": "matrix",
207
+ "core": true,
201
208
  "unlocked_by": null,
202
209
  "difficulty": 4,
203
210
  "topics": [
211
+ "Matrices",
212
+ "Type conversion",
204
213
  "Arrays",
205
- "Mathematics"
214
+ "Exception handling",
215
+ "Strings"
206
216
  ]
207
217
  },
208
218
  {
209
- "uuid": "2c5fb577-a9ce-4c4c-8fc8-fffb38d020d6",
210
- "slug": "series",
219
+ "uuid": "92e2a192-5ee9-422a-8699-c231a7136b10",
220
+ "slug": "pascals-triangle",
211
221
  "core": false,
212
- "unlocked_by": null,
213
- "difficulty": 3,
222
+ "unlocked_by": "series",
223
+ "difficulty": 4,
214
224
  "topics": [
215
- "Strings",
216
225
  "Arrays",
217
- "Refactoring"
226
+ "Mathematics"
218
227
  ]
219
228
  },
220
229
  {
221
230
  "uuid": "95f49a88-6f01-4905-a8b1-a3fcec1f535a",
222
231
  "slug": "queen-attack",
223
- "core": false,
232
+ "core": true,
224
233
  "unlocked_by": null,
225
234
  "difficulty": 5,
226
235
  "topics": [
@@ -231,58 +240,99 @@
231
240
  ]
232
241
  },
233
242
  {
234
- "uuid": "b4f6b08b-a132-447b-b447-66bf37ab20c6",
235
- "slug": "grains",
243
+ "uuid": "fee57b09-2b67-4483-a2e5-3dfec0568b15",
244
+ "slug": "leap",
236
245
  "core": false,
237
- "unlocked_by": null,
238
- "difficulty": 2,
246
+ "unlocked_by": "hamming",
247
+ "difficulty": 1,
239
248
  "topics": [
240
- "Control-flow (if-else statements)",
241
- "Bitwise operations",
242
- "Mathematics",
243
- "Type conversion",
244
- "Integers"
249
+ "Control-flow (conditionals)",
250
+ "Booleans",
251
+ "Integers",
252
+ "Logic"
245
253
  ]
246
254
  },
247
255
  {
248
- "uuid": "73da448c-33b7-4565-ab48-1de5020d65ab",
249
- "slug": "etl",
256
+ "uuid": "ea390e58-6ac5-4219-89bb-648852712a6a",
257
+ "slug": "gigasecond",
250
258
  "core": false,
251
- "unlocked_by": null,
259
+ "unlocked_by": "hamming",
252
260
  "difficulty": 1,
253
261
  "topics": [
254
- "Control-flow (loops)",
255
- "Maps",
256
- "Transforming"
262
+ "Time"
257
263
  ]
258
264
  },
259
265
  {
260
- "uuid": "20cbd8f9-f8e3-4767-a0f5-94810ba3f902",
261
- "slug": "scrabble-score",
266
+ "uuid": "fb03948c-11e8-440d-9a5d-979396451270",
267
+ "slug": "accumulate",
262
268
  "core": false,
263
- "unlocked_by": null,
269
+ "unlocked_by": "raindrops",
264
270
  "difficulty": 1,
271
+ "topics": [
272
+ "Lists"
273
+ ]
274
+ },
275
+ {
276
+ "uuid": "d14c6283-e57c-472c-8181-87f82d9088dd",
277
+ "slug": "pangram",
278
+ "core": false,
279
+ "unlocked_by": "raindrops",
280
+ "difficulty": 2,
265
281
  "topics": [
266
282
  "Control-flow (loops)",
267
- "Maps",
268
283
  "Strings"
269
284
  ]
270
285
  },
271
286
  {
272
- "uuid": "bf366b19-63bf-4a75-9a35-08b881af6951",
273
- "slug": "parallel-letter-frequency",
287
+ "uuid": "efdf07a1-e329-4d0f-90a1-374b9b8af748",
288
+ "slug": "bob",
274
289
  "core": false,
275
- "unlocked_by": null,
276
- "difficulty": 3,
290
+ "unlocked_by": "raindrops",
291
+ "difficulty": 2,
277
292
  "topics": [
278
- "Concurrency"
293
+ "Control-flow (conditionals)",
294
+ "Strings"
295
+ ]
296
+ },
297
+ {
298
+ "uuid": "cd05b63b-df20-4c8d-8743-53033acf7696",
299
+ "slug": "error-handling",
300
+ "core": false,
301
+ "unlocked_by": "queen-attack",
302
+ "difficulty": 5,
303
+ "topics": [
304
+ "Exception handling"
305
+ ]
306
+ },
307
+ {
308
+ "uuid": "9a1870e0-dce7-496e-9521-2f2b606ac6c5",
309
+ "slug": "secret-handshake",
310
+ "core": false,
311
+ "unlocked_by": "grains",
312
+ "difficulty": 5,
313
+ "topics": [
314
+ "Bitwise operations",
315
+ "Arrays",
316
+ "Integers"
317
+ ]
318
+ },
319
+ {
320
+ "uuid": "11008fb0-4ef9-4aff-befb-c56f4084f96e",
321
+ "slug": "house",
322
+ "core": false,
323
+ "unlocked_by": "twelve-days",
324
+ "difficulty": 4,
325
+ "topics": [
326
+ "Strings",
327
+ "Text formatting",
328
+ "Recursion"
279
329
  ]
280
330
  },
281
331
  {
282
332
  "uuid": "f0c25fde-960e-4161-a642-4414925b4d0a",
283
333
  "slug": "sum-of-multiples",
284
334
  "core": false,
285
- "unlocked_by": null,
335
+ "unlocked_by": "difference-of-squares",
286
336
  "difficulty": 5,
287
337
  "topics": [
288
338
  "Control-flow (loops)",
@@ -293,7 +343,7 @@
293
343
  "uuid": "6c919eab-7c63-444a-a485-db74d51c3430",
294
344
  "slug": "pythagorean-triplet",
295
345
  "core": false,
296
- "unlocked_by": null,
346
+ "unlocked_by": "difference-of-squares",
297
347
  "difficulty": 5,
298
348
  "topics": [
299
349
  "Algorithms",
@@ -304,7 +354,7 @@
304
354
  "uuid": "c2064df8-cce5-4f03-9d85-0818b4e34112",
305
355
  "slug": "isogram",
306
356
  "core": false,
307
- "unlocked_by": null,
357
+ "unlocked_by": "pangram",
308
358
  "difficulty": 3,
309
359
  "topics": [
310
360
  "Strings",
@@ -315,7 +365,7 @@
315
365
  "uuid": "7cb6c78e-44e9-499b-a745-3ecb73bea3ab",
316
366
  "slug": "bank-account",
317
367
  "core": false,
318
- "unlocked_by": null,
368
+ "unlocked_by": "parallel-letter-frequency",
319
369
  "difficulty": 4,
320
370
  "topics": [
321
371
  "Concurrency",
@@ -326,7 +376,7 @@
326
376
  "uuid": "a1c065d9-6971-4286-8413-c944e2dddefa",
327
377
  "slug": "crypto-square",
328
378
  "core": false,
329
- "unlocked_by": null,
379
+ "unlocked_by": "luhn",
330
380
  "difficulty": 3,
331
381
  "topics": [
332
382
  "Cryptography",
@@ -340,7 +390,7 @@
340
390
  "uuid": "8b29da0e-8ead-4e72-a12a-d448c8434767",
341
391
  "slug": "luhn",
342
392
  "core": false,
343
- "unlocked_by": null,
393
+ "unlocked_by": "acronym",
344
394
  "difficulty": 2,
345
395
  "topics": [
346
396
  "Algorithms",
@@ -352,7 +402,7 @@
352
402
  "uuid": "12a16ab5-35fc-4fb2-a018-504953f3ad80",
353
403
  "slug": "food-chain",
354
404
  "core": false,
355
- "unlocked_by": null,
405
+ "unlocked_by": "twelve-days",
356
406
  "difficulty": 4,
357
407
  "topics": [
358
408
  "Control-flow (conditionals)",
@@ -366,7 +416,7 @@
366
416
  "uuid": "8ec72d61-d830-48cf-819d-cd4faf0cf67d",
367
417
  "slug": "largest-series-product",
368
418
  "core": false,
369
- "unlocked_by": null,
419
+ "unlocked_by": "difference-of-squares",
370
420
  "difficulty": 3,
371
421
  "topics": [
372
422
  "Integers",
@@ -378,7 +428,7 @@
378
428
  "uuid": "c3469a26-b133-43b4-ab7d-32ea04fa5ce4",
379
429
  "slug": "sieve",
380
430
  "core": false,
381
- "unlocked_by": null,
431
+ "unlocked_by": "strain",
382
432
  "difficulty": 3,
383
433
  "topics": [
384
434
  "Algorithms",
@@ -392,7 +442,7 @@
392
442
  "uuid": "10f091b1-deda-4fec-8e3c-9dabb080d473",
393
443
  "slug": "palindrome-products",
394
444
  "core": false,
395
- "unlocked_by": null,
445
+ "unlocked_by": "perfect-numbers",
396
446
  "difficulty": 6,
397
447
  "topics": [
398
448
  "Mathematics",
@@ -403,7 +453,7 @@
403
453
  "uuid": "0b9e07de-c8e4-4d28-b589-897a7ef8062a",
404
454
  "slug": "protein-translation",
405
455
  "core": false,
406
- "unlocked_by": null,
456
+ "unlocked_by": "rna-transcription",
407
457
  "difficulty": 3,
408
458
  "topics": [
409
459
  "Filtering",
@@ -415,7 +465,7 @@
415
465
  "uuid": "362f93ab-51e8-4d6a-bd2f-b46432843eb9",
416
466
  "slug": "perfect-numbers",
417
467
  "core": false,
418
- "unlocked_by": null,
468
+ "unlocked_by": "clock",
419
469
  "difficulty": 4,
420
470
  "topics": [
421
471
  "Integers",
@@ -428,7 +478,7 @@
428
478
  "uuid": "6c2499f7-d42c-4d0f-9680-f5f7650023ff",
429
479
  "slug": "bracket-push",
430
480
  "core": false,
431
- "unlocked_by": null,
481
+ "unlocked_by": "poker",
432
482
  "difficulty": 7,
433
483
  "topics": [
434
484
  "Parsing",
@@ -439,7 +489,7 @@
439
489
  "uuid": "f1db7190-a53d-411d-b538-8dc3f75ddc32",
440
490
  "slug": "anagram",
441
491
  "core": false,
442
- "unlocked_by": null,
492
+ "unlocked_by": "scrabble-score",
443
493
  "difficulty": 3,
444
494
  "topics": [
445
495
  "Strings",
@@ -447,22 +497,11 @@
447
497
  "Filtering"
448
498
  ]
449
499
  },
450
- {
451
- "uuid": "b765fde9-84b4-44cc-bdf1-f66ac1ab8e2c",
452
- "slug": "word-count",
453
- "core": false,
454
- "unlocked_by": null,
455
- "difficulty": 3,
456
- "topics": [
457
- "Strings",
458
- "Sorting"
459
- ]
460
- },
461
500
  {
462
501
  "uuid": "cbfd4cfb-abe7-45f9-80e4-3de3b2639fc8",
463
502
  "slug": "allergies",
464
503
  "core": false,
465
- "unlocked_by": null,
504
+ "unlocked_by": "grains",
466
505
  "difficulty": 4,
467
506
  "topics": [
468
507
  "Enumeration",
@@ -473,7 +512,7 @@
473
512
  "uuid": "9bef2163-2a24-4d50-9610-e3cac2e7772a",
474
513
  "slug": "rna-transcription",
475
514
  "core": false,
476
- "unlocked_by": null,
515
+ "unlocked_by": "scrabble-score",
477
516
  "difficulty": 2,
478
517
  "topics": [
479
518
  "Maps",
@@ -484,7 +523,7 @@
484
523
  "uuid": "eccfd2b3-93cf-41a8-b39b-c29596469e8e",
485
524
  "slug": "roman-numerals",
486
525
  "core": false,
487
- "unlocked_by": null,
526
+ "unlocked_by": "acronym",
488
527
  "difficulty": 2,
489
528
  "topics": [
490
529
  "Numbers",
@@ -495,7 +534,7 @@
495
534
  "uuid": "5d742499-b130-458a-ba3e-a4c3d75419c3",
496
535
  "slug": "say",
497
536
  "core": false,
498
- "unlocked_by": null,
537
+ "unlocked_by": "meetup",
499
538
  "difficulty": 7,
500
539
  "topics": [
501
540
  "Numbers",
@@ -508,7 +547,7 @@
508
547
  "uuid": "c13edd0a-cd39-4f25-970c-c1f9e32bac2c",
509
548
  "slug": "circular-buffer",
510
549
  "core": false,
511
- "unlocked_by": null,
550
+ "unlocked_by": "grade-school",
512
551
  "difficulty": 5,
513
552
  "topics": [
514
553
  "Queues",
@@ -519,7 +558,7 @@
519
558
  "uuid": "86b8f1e6-e088-403e-984a-abd360f5dcef",
520
559
  "slug": "robot-name",
521
560
  "core": false,
522
- "unlocked_by": null,
561
+ "unlocked_by": "scrabble-score",
523
562
  "difficulty": 3,
524
563
  "topics": [
525
564
  "Randomness"
@@ -529,7 +568,7 @@
529
568
  "uuid": "47b9ad32-e9d9-4cbc-b106-540f3afbfa80",
530
569
  "slug": "diamond",
531
570
  "core": false,
532
- "unlocked_by": null,
571
+ "unlocked_by": "series",
533
572
  "difficulty": 4,
534
573
  "topics": [
535
574
  "Strings",
@@ -543,7 +582,7 @@
543
582
  "uuid": "4b168cb9-605b-465d-8f89-3a3b760c1402",
544
583
  "slug": "react",
545
584
  "core": false,
546
- "unlocked_by": null,
585
+ "unlocked_by": "queen-attack",
547
586
  "difficulty": 9,
548
587
  "topics": [
549
588
  "Reactive programming"
@@ -553,7 +592,7 @@
553
592
  "uuid": "ad12bbf9-e0c8-433a-8a6b-847ff2d36acf",
554
593
  "slug": "custom-set",
555
594
  "core": false,
556
- "unlocked_by": null,
595
+ "unlocked_by": "strain",
557
596
  "difficulty": 4,
558
597
  "topics": [
559
598
  "Sets",
@@ -565,7 +604,7 @@
565
604
  "uuid": "84bda80c-b82c-45f6-95d4-5568d23a22dd",
566
605
  "slug": "atbash-cipher",
567
606
  "core": false,
568
- "unlocked_by": null,
607
+ "unlocked_by": "luhn",
569
608
  "difficulty": 3,
570
609
  "topics": [
571
610
  "Algorithms",
@@ -578,7 +617,7 @@
578
617
  "uuid": "458053ea-43a9-409f-a1a6-a7f31329aca4",
579
618
  "slug": "phone-number",
580
619
  "core": false,
581
- "unlocked_by": null,
620
+ "unlocked_by": "etl",
582
621
  "difficulty": 3,
583
622
  "topics": [
584
623
  "Control-flow (conditionals)",
@@ -587,23 +626,11 @@
587
626
  "Text formatting"
588
627
  ]
589
628
  },
590
- {
591
- "uuid": "7fbb0d9d-71d1-4654-8ca0-bb07ddbe6cb5",
592
- "slug": "strain",
593
- "core": false,
594
- "unlocked_by": null,
595
- "difficulty": 2,
596
- "topics": [
597
- "Filtering",
598
- "Control-flow (loops)",
599
- "Arrays"
600
- ]
601
- },
602
629
  {
603
630
  "uuid": "4fe8ba14-20ba-4aa3-b134-7aed799a7522",
604
631
  "slug": "pig-latin",
605
632
  "core": false,
606
- "unlocked_by": null,
633
+ "unlocked_by": "phone-number",
607
634
  "difficulty": 4,
608
635
  "topics": [
609
636
  "Strings",
@@ -615,7 +642,7 @@
615
642
  "uuid": "dbf4d64e-c02d-4bdf-8be1-43f9acb5f2ad",
616
643
  "slug": "prime-factors",
617
644
  "core": false,
618
- "unlocked_by": null,
645
+ "unlocked_by": "clock",
619
646
  "difficulty": 3,
620
647
  "topics": [
621
648
  "Mathematics",
@@ -627,7 +654,7 @@
627
654
  "uuid": "7f19ebbd-b072-45e5-ad67-2fff8ad1c9e2",
628
655
  "slug": "transpose",
629
656
  "core": false,
630
- "unlocked_by": null,
657
+ "unlocked_by": "roman-numerals",
631
658
  "difficulty": 5,
632
659
  "topics": [
633
660
  "Control-flow (loops)",
@@ -639,7 +666,7 @@
639
666
  "uuid": "128e0b12-0ad2-431a-971c-ad4ab098b42d",
640
667
  "slug": "nth-prime",
641
668
  "core": false,
642
- "unlocked_by": null,
669
+ "unlocked_by": "difference-of-squares",
643
670
  "difficulty": 3,
644
671
  "topics": [
645
672
  "Mathematics",
@@ -651,7 +678,7 @@
651
678
  "uuid": "f3058f8b-7e0e-4adb-9add-1df23607d4ed",
652
679
  "slug": "diffie-hellman",
653
680
  "core": false,
654
- "unlocked_by": null,
681
+ "unlocked_by": "luhn",
655
682
  "difficulty": 5,
656
683
  "topics": [
657
684
  "Cryptography",
@@ -664,7 +691,7 @@
664
691
  "uuid": "094ea17e-1759-443a-9117-7c72c6f68b8d",
665
692
  "slug": "beer-song",
666
693
  "core": false,
667
- "unlocked_by": null,
694
+ "unlocked_by": "twelve-days",
668
695
  "difficulty": 3,
669
696
  "topics": [
670
697
  "Strings",
@@ -676,7 +703,7 @@
676
703
  "uuid": "13e58d89-4dbb-4384-9268-2f8083588d7a",
677
704
  "slug": "ocr-numbers",
678
705
  "core": false,
679
- "unlocked_by": null,
706
+ "unlocked_by": "poker",
680
707
  "difficulty": 7,
681
708
  "topics": [
682
709
  "Parsing",
@@ -687,7 +714,7 @@
687
714
  "uuid": "1eb7d7b2-6367-4038-bb86-7dc6c682b6a3",
688
715
  "slug": "wordy",
689
716
  "core": false,
690
- "unlocked_by": null,
717
+ "unlocked_by": "triangle",
691
718
  "difficulty": 3,
692
719
  "topics": [
693
720
  "Parsing",
@@ -701,7 +728,7 @@
701
728
  "uuid": "5911d90f-ba2f-482f-8c92-c01c112d6fdd",
702
729
  "slug": "nucleotide-count",
703
730
  "core": false,
704
- "unlocked_by": null,
731
+ "unlocked_by": "scrabble-score",
705
732
  "difficulty": 2,
706
733
  "topics": [
707
734
  "Strings",
@@ -713,7 +740,7 @@
713
740
  "uuid": "aa598f3e-9d2b-4f9f-8c14-46e0ac27d5be",
714
741
  "slug": "grade-school",
715
742
  "core": false,
716
- "unlocked_by": null,
743
+ "unlocked_by": "word-count",
717
744
  "difficulty": 5,
718
745
  "topics": [
719
746
  "Sorting",
@@ -721,25 +748,11 @@
721
748
  "Lists"
722
749
  ]
723
750
  },
724
- {
725
- "uuid": "62aa3d20-65d8-440f-9d08-48bbc823f4fe",
726
- "slug": "matrix",
727
- "core": false,
728
- "unlocked_by": null,
729
- "difficulty": 4,
730
- "topics": [
731
- "Matrices",
732
- "Type conversion",
733
- "Arrays",
734
- "Exception handling",
735
- "Strings"
736
- ]
737
- },
738
751
  {
739
752
  "uuid": "c78102b0-aaa3-4edb-a315-4fcdc26ccae8",
740
753
  "slug": "saddle-points",
741
754
  "core": false,
742
- "unlocked_by": null,
755
+ "unlocked_by": "matrix",
743
756
  "difficulty": 5,
744
757
  "topics": [
745
758
  "Arrays",
@@ -752,7 +765,7 @@
752
765
  "uuid": "fcf735fe-a659-40ae-858e-6d1e834a4faf",
753
766
  "slug": "meetup",
754
767
  "core": false,
755
- "unlocked_by": null,
768
+ "unlocked_by": "roman-numerals",
756
769
  "difficulty": 3,
757
770
  "topics": [
758
771
  "Dates",
@@ -761,24 +774,11 @@
761
774
  "Type conversion"
762
775
  ]
763
776
  },
764
- {
765
- "uuid": "31c77516-6702-417e-9c6e-19c7e965d513",
766
- "slug": "binary-search",
767
- "core": false,
768
- "unlocked_by": null,
769
- "difficulty": 5,
770
- "topics": [
771
- "Algorithms",
772
- "Arrays",
773
- "Searching",
774
- "Sorting"
775
- ]
776
- },
777
777
  {
778
778
  "uuid": "ac680609-4e52-468d-bf17-afbf7b2fa74b",
779
779
  "slug": "binary-search-tree",
780
780
  "core": false,
781
- "unlocked_by": null,
781
+ "unlocked_by": "binary-search",
782
782
  "difficulty": 5,
783
783
  "topics": [
784
784
  "Algorithms",
@@ -793,7 +793,7 @@
793
793
  "uuid": "d0a2afab-e30d-4617-b646-413a44ecf2ed",
794
794
  "slug": "tree-building",
795
795
  "core": false,
796
- "unlocked_by": null,
796
+ "unlocked_by": "series",
797
797
  "difficulty": 3,
798
798
  "topics": [
799
799
  "Records",
@@ -806,7 +806,7 @@
806
806
  "uuid": "4282b1f6-d1a2-41b4-9a7f-a9a145fb283b",
807
807
  "slug": "kindergarten-garden",
808
808
  "core": false,
809
- "unlocked_by": null,
809
+ "unlocked_by": "clock",
810
810
  "difficulty": 3,
811
811
  "topics": [
812
812
  "Parsing",
@@ -820,7 +820,7 @@
820
820
  "uuid": "7b9201fa-92d2-43fd-8b35-4c552336570b",
821
821
  "slug": "simple-cipher",
822
822
  "core": false,
823
- "unlocked_by": null,
823
+ "unlocked_by": "luhn",
824
824
  "difficulty": 3,
825
825
  "topics": [
826
826
  "Algorithms",
@@ -834,7 +834,7 @@
834
834
  "uuid": "5dbec590-7a50-4398-987b-7252734216a2",
835
835
  "slug": "paasio",
836
836
  "core": false,
837
- "unlocked_by": null,
837
+ "unlocked_by": "parallel-letter-frequency",
838
838
  "difficulty": 5,
839
839
  "topics": [
840
840
  "Concurrency",
@@ -846,7 +846,7 @@
846
846
  "uuid": "cdbadf95-66ff-455f-bea3-eff5024afcb7",
847
847
  "slug": "pov",
848
848
  "core": false,
849
- "unlocked_by": null,
849
+ "unlocked_by": "tree-building",
850
850
  "difficulty": 7,
851
851
  "topics": [
852
852
  "Graphs",
@@ -860,7 +860,7 @@
860
860
  "uuid": "3bf049f8-7283-4370-aa0c-e10e99d9ef80",
861
861
  "slug": "minesweeper",
862
862
  "core": false,
863
- "unlocked_by": null,
863
+ "unlocked_by": "sieve",
864
864
  "difficulty": 5,
865
865
  "topics": [
866
866
  "Arrays",
@@ -874,7 +874,7 @@
874
874
  "uuid": "fc0e4034-0744-43f8-9969-7789cff0607f",
875
875
  "slug": "robot-simulator",
876
876
  "core": false,
877
- "unlocked_by": null,
877
+ "unlocked_by": "queen-attack",
878
878
  "difficulty": 6,
879
879
  "topics": [
880
880
  "Concurrency",
@@ -888,7 +888,7 @@
888
888
  "uuid": "572d03ec-d763-400e-ba4f-5a6a92d5af98",
889
889
  "slug": "tournament",
890
890
  "core": false,
891
- "unlocked_by": null,
891
+ "unlocked_by": "kindergarten-garden",
892
892
  "difficulty": 3,
893
893
  "topics": [
894
894
  "Integers",
@@ -904,7 +904,7 @@
904
904
  "uuid": "7fdf352b-e5a3-452e-91a2-03587be48ad0",
905
905
  "slug": "word-search",
906
906
  "core": false,
907
- "unlocked_by": null,
907
+ "unlocked_by": "matrix",
908
908
  "difficulty": 4,
909
909
  "topics": [
910
910
  "Matrices",
@@ -916,7 +916,7 @@
916
916
  "uuid": "932a7ed0-c331-49b1-917b-a197198f642a",
917
917
  "slug": "all-your-base",
918
918
  "core": false,
919
- "unlocked_by": null,
919
+ "unlocked_by": "wordy",
920
920
  "difficulty": 3,
921
921
  "topics": [
922
922
  "Integers",
@@ -928,7 +928,7 @@
928
928
  "uuid": "395116bc-5be9-4140-a2ef-c7e8689149f2",
929
929
  "slug": "connect",
930
930
  "core": false,
931
- "unlocked_by": null,
931
+ "unlocked_by": "bowling",
932
932
  "difficulty": 9,
933
933
  "topics": [
934
934
  "Arrays",
@@ -942,7 +942,7 @@
942
942
  "uuid": "7aa53a27-4ff3-4891-809f-2af728eb55a0",
943
943
  "slug": "ledger",
944
944
  "core": false,
945
- "unlocked_by": null,
945
+ "unlocked_by": "series",
946
946
  "difficulty": 4,
947
947
  "topics": [
948
948
  "Dates",
@@ -958,7 +958,7 @@
958
958
  "uuid": "9be60690-39bb-4173-a2ed-faa4acd8f38f",
959
959
  "slug": "poker",
960
960
  "core": false,
961
- "unlocked_by": null,
961
+ "unlocked_by": "tournament",
962
962
  "difficulty": 5,
963
963
  "topics": [
964
964
  "Equality",
@@ -973,7 +973,7 @@
973
973
  "uuid": "333231db-2605-438e-9eb0-d1bdc51c7419",
974
974
  "slug": "variable-length-quantity",
975
975
  "core": false,
976
- "unlocked_by": null,
976
+ "unlocked_by": "grains",
977
977
  "difficulty": 5,
978
978
  "topics": [
979
979
  "Bitwise operations",
@@ -985,7 +985,7 @@
985
985
  "uuid": "09d0d78f-f262-4f34-b1de-c2acd7ed80cd",
986
986
  "slug": "forth",
987
987
  "core": false,
988
- "unlocked_by": null,
988
+ "unlocked_by": "bracket-push",
989
989
  "difficulty": 8,
990
990
  "topics": [
991
991
  "Domain-specific languages",
@@ -997,7 +997,7 @@
997
997
  "uuid": "94a21509-ebd5-4a66-bb0e-0341e57e3c73",
998
998
  "slug": "change",
999
999
  "core": false,
1000
- "unlocked_by": null,
1000
+ "unlocked_by": "kindergarten-garden",
1001
1001
  "difficulty": 5,
1002
1002
  "topics": [
1003
1003
  "Algorithms",
@@ -1011,7 +1011,7 @@
1011
1011
  "uuid": "8d5aaf47-7503-4797-85ed-d35a8755cfd4",
1012
1012
  "slug": "bowling",
1013
1013
  "core": false,
1014
- "unlocked_by": null,
1014
+ "unlocked_by": "queen-attack",
1015
1015
  "difficulty": 5,
1016
1016
  "topics": [
1017
1017
  "Algorithms",