trackler 2.2.1.71 → 2.2.1.72

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/book-store/canonical-data.json +9 -2
  4. data/problem-specifications/exercises/word-count/canonical-data.json +9 -0
  5. data/tracks/bash/CONTRIBUTING.md +199 -0
  6. data/tracks/bash/config.json +24 -11
  7. data/tracks/bash/exercises/triangle/README.md +38 -0
  8. data/tracks/bash/exercises/triangle/example.sh +56 -0
  9. data/tracks/bash/exercises/triangle/triangle_test.sh +126 -0
  10. data/tracks/bash/img/canonical-data-example.png +0 -0
  11. data/tracks/bash/img/create-pr.png +0 -0
  12. data/tracks/bash/img/fork-repository.png +0 -0
  13. data/tracks/c/exercises/acronym/makefile +1 -1
  14. data/tracks/c/exercises/all-your-base/makefile +1 -1
  15. data/tracks/c/exercises/allergies/makefile +1 -1
  16. data/tracks/c/exercises/anagram/makefile +1 -1
  17. data/tracks/c/exercises/atbash-cipher/makefile +1 -1
  18. data/tracks/c/exercises/beer-song/makefile +1 -1
  19. data/tracks/c/exercises/binary-search/makefile +1 -1
  20. data/tracks/c/exercises/binary/makefile +1 -1
  21. data/tracks/c/exercises/bob/makefile +1 -1
  22. data/tracks/c/exercises/clock/makefile +1 -1
  23. data/tracks/c/exercises/collatz-conjecture/makefile +1 -1
  24. data/tracks/c/exercises/difference-of-squares/makefile +1 -1
  25. data/tracks/c/exercises/gigasecond/makefile +1 -1
  26. data/tracks/c/exercises/grains/makefile +1 -1
  27. data/tracks/c/exercises/hamming/makefile +1 -1
  28. data/tracks/c/exercises/hamming/test/test_hamming.c +2 -2
  29. data/tracks/c/exercises/hello-world/makefile +1 -1
  30. data/tracks/c/exercises/isogram/makefile +1 -1
  31. data/tracks/c/exercises/largest-series-product/makefile +1 -1
  32. data/tracks/c/exercises/leap/makefile +1 -1
  33. data/tracks/c/exercises/meetup/makefile +1 -1
  34. data/tracks/c/exercises/nth-prime/makefile +1 -1
  35. data/tracks/c/exercises/nucleotide-count/makefile +1 -1
  36. data/tracks/c/exercises/palindrome-products/makefile +1 -1
  37. data/tracks/c/exercises/pangram/makefile +1 -1
  38. data/tracks/c/exercises/pascals-triangle/makefile +1 -1
  39. data/tracks/c/exercises/perfect-numbers/makefile +1 -1
  40. data/tracks/c/exercises/phone-number/makefile +1 -1
  41. data/tracks/c/exercises/queen-attack/makefile +1 -1
  42. data/tracks/c/exercises/raindrops/makefile +1 -1
  43. data/tracks/c/exercises/react/makefile +1 -1
  44. data/tracks/c/exercises/rna-transcription/makefile +1 -1
  45. data/tracks/c/exercises/robot-simulator/makefile +1 -1
  46. data/tracks/c/exercises/roman-numerals/makefile +1 -1
  47. data/tracks/c/exercises/scrabble-score/makefile +1 -1
  48. data/tracks/c/exercises/series/makefile +1 -1
  49. data/tracks/c/exercises/sieve/makefile +1 -1
  50. data/tracks/c/exercises/space-age/makefile +1 -1
  51. data/tracks/c/exercises/sublist/makefile +1 -1
  52. data/tracks/c/exercises/sum-of-multiples/makefile +1 -1
  53. data/tracks/c/exercises/triangle/makefile +1 -1
  54. data/tracks/c/exercises/word-count/makefile +1 -1
  55. data/tracks/delphi/exercises/allergies/README.md +1 -1
  56. data/tracks/delphi/exercises/bank-account/README.md +1 -1
  57. data/tracks/delphi/exercises/beer-song/README.md +1 -1
  58. data/tracks/delphi/exercises/binary-search/README.md +1 -1
  59. data/tracks/delphi/exercises/bob/README.md +1 -1
  60. data/tracks/delphi/exercises/book-store/README.md +1 -1
  61. data/tracks/delphi/exercises/book-store/uBookStoreExample.pas +34 -14
  62. data/tracks/delphi/exercises/book-store/uBookStoreTests.pas +36 -1
  63. data/tracks/delphi/exercises/bowling/README.md +1 -1
  64. data/tracks/delphi/exercises/circular-buffer/README.md +1 -1
  65. data/tracks/delphi/exercises/clock/README.md +1 -1
  66. data/tracks/delphi/exercises/collatz-conjecture/README.md +1 -1
  67. data/tracks/delphi/exercises/etl/README.md +1 -1
  68. data/tracks/delphi/exercises/grains/README.md +1 -1
  69. data/tracks/delphi/exercises/hamming/README.md +1 -1
  70. data/tracks/delphi/exercises/hello-world/README.md +1 -1
  71. data/tracks/delphi/exercises/leap/README.md +1 -1
  72. data/tracks/delphi/exercises/minesweeper/README.md +1 -1
  73. data/tracks/delphi/exercises/nucleotide-count/README.md +1 -1
  74. data/tracks/delphi/exercises/perfect-numbers/README.md +1 -1
  75. data/tracks/delphi/exercises/phone-number/README.md +1 -1
  76. data/tracks/delphi/exercises/pig-latin/README.md +1 -1
  77. data/tracks/delphi/exercises/poker/README.md +1 -1
  78. data/tracks/delphi/exercises/raindrops/README.md +1 -1
  79. data/tracks/delphi/exercises/reverse-string/README.md +1 -1
  80. data/tracks/delphi/exercises/rna-transcription/README.md +1 -1
  81. data/tracks/delphi/exercises/roman-numerals/README.md +1 -1
  82. data/tracks/delphi/exercises/saddle-points/README.md +1 -1
  83. data/tracks/delphi/exercises/triangle/README.md +1 -1
  84. data/tracks/delphi/exercises/two-fer/README.md +1 -1
  85. data/tracks/delphi/exercises/wordy/README.md +1 -1
  86. data/tracks/ecmascript/.travis.yml +1 -1
  87. data/tracks/ecmascript/Makefile +4 -5
  88. data/tracks/ecmascript/README.md +2 -1
  89. data/tracks/ecmascript/config.json +12 -0
  90. data/tracks/ecmascript/exercises/change/package.json +5 -3
  91. data/tracks/ecmascript/exercises/protein-translation/package.json +2 -2
  92. data/tracks/ecmascript/exercises/react/README.md +41 -0
  93. data/tracks/ecmascript/exercises/react/example.js +101 -0
  94. data/tracks/ecmascript/exercises/react/package.json +71 -0
  95. data/tracks/ecmascript/exercises/react/react.spec.js +211 -0
  96. data/tracks/ecmascript/exercises/rectangles/package.json +1 -2
  97. data/tracks/ecmascript/exercises/rotational-cipher/package.json +1 -2
  98. data/tracks/ecmascript/exercises/spiral-matrix/package.json +1 -2
  99. data/tracks/ecmascript/exercises/transpose/package.json +2 -2
  100. data/tracks/erlang/docs/ABOUT.md +1 -1
  101. data/tracks/go/exercises/binary-search/.meta/gen.go +55 -0
  102. data/tracks/go/exercises/binary-search/binary_search_test.go +26 -167
  103. data/tracks/go/exercises/binary-search/cases_test.go +73 -0
  104. data/tracks/go/exercises/binary-search/example.go +8 -30
  105. data/tracks/go/exercises/nth-prime/.meta/gen.go +76 -0
  106. data/tracks/go/exercises/nth-prime/cases_test.go +43 -0
  107. data/tracks/go/exercises/nth-prime/nth_prime_test.go +4 -18
  108. data/tracks/go/exercises/prime-factors/.meta/gen.go +54 -0
  109. data/tracks/go/exercises/prime-factors/cases_test.go +48 -0
  110. data/tracks/go/exercises/prime-factors/prime_factors_test.go +4 -19
  111. data/tracks/groovy/config.json +13 -1
  112. data/tracks/groovy/exercises/linked-list/DoubleLinkedList.groovy +19 -0
  113. data/tracks/groovy/exercises/linked-list/DoubleLinkedListSpec.groovy +79 -0
  114. data/tracks/groovy/exercises/linked-list/Example.groovy +57 -0
  115. data/tracks/groovy/exercises/linked-list/README.md +49 -0
  116. data/tracks/java/bin/run-journey-test-from-ci.sh +1 -1
  117. data/tracks/java/config.json +10 -0
  118. data/tracks/java/config/maintainers.json +8 -1
  119. data/tracks/java/docs/MAINTAINING.md +3 -3
  120. data/tracks/java/exercises/accumulate/.meta/src/reference/java/Accumulate.java +2 -2
  121. data/tracks/java/exercises/binary/.meta/src/reference/java/Binary.java +3 -3
  122. data/tracks/java/exercises/circular-buffer/.meta/src/reference/java/BufferIOException.java +1 -1
  123. data/tracks/java/exercises/circular-buffer/.meta/src/reference/java/CircularBuffer.java +6 -6
  124. data/tracks/java/exercises/circular-buffer/src/main/java/BufferIOException.java +1 -1
  125. data/tracks/java/exercises/clock/.meta/src/reference/java/Clock.java +3 -3
  126. data/tracks/java/exercises/crypto-square/.meta/src/reference/java/Crypto.java +7 -7
  127. data/tracks/java/exercises/etl/.meta/src/reference/java/Etl.java +2 -2
  128. data/tracks/java/exercises/etl/src/main/java/Etl.java +2 -2
  129. data/tracks/java/exercises/kindergarten-garden/.meta/src/reference/java/KindergartenGarden.java +4 -4
  130. data/tracks/java/exercises/kindergarten-garden/.meta/src/reference/java/Plant.java +2 -2
  131. data/tracks/java/exercises/kindergarten-garden/src/main/java/Plant.java +2 -2
  132. data/tracks/java/exercises/nth-prime/.meta/src/reference/java/PrimeCalculator.java +2 -2
  133. data/tracks/java/exercises/reverse-string/.meta/src/reference/java/ReverseString.java +7 -0
  134. data/tracks/java/exercises/reverse-string/.meta/version +1 -0
  135. data/tracks/java/exercises/reverse-string/README.md +25 -0
  136. data/tracks/java/exercises/reverse-string/build.gradle +17 -0
  137. data/tracks/java/exercises/reverse-string/src/main/java/ReverseString.java +7 -0
  138. data/tracks/java/exercises/reverse-string/src/test/java/ReverseStringTest.java +37 -0
  139. data/tracks/java/exercises/run-length-encoding/.meta/src/reference/java/RunLengthEncoding.java +4 -4
  140. data/tracks/java/exercises/settings.gradle +1 -0
  141. data/tracks/kotlin/docs/RESOURCES.md +1 -1
  142. data/tracks/kotlin/exercises/accumulate/build.gradle +1 -1
  143. data/tracks/kotlin/exercises/acronym/build.gradle +1 -1
  144. data/tracks/kotlin/exercises/all-your-base/build.gradle +1 -1
  145. data/tracks/kotlin/exercises/allergies/build.gradle +1 -1
  146. data/tracks/kotlin/exercises/anagram/build.gradle +1 -1
  147. data/tracks/kotlin/exercises/atbash-cipher/build.gradle +1 -1
  148. data/tracks/kotlin/exercises/bank-account/build.gradle +1 -1
  149. data/tracks/kotlin/exercises/beer-song/build.gradle +1 -1
  150. data/tracks/kotlin/exercises/binary-search/build.gradle +1 -1
  151. data/tracks/kotlin/exercises/binary/build.gradle +1 -1
  152. data/tracks/kotlin/exercises/bob/build.gradle +1 -1
  153. data/tracks/kotlin/exercises/bracket-push/build.gradle +1 -1
  154. data/tracks/kotlin/exercises/change/build.gradle +1 -1
  155. data/tracks/kotlin/exercises/clock/build.gradle +1 -1
  156. data/tracks/kotlin/exercises/collatz-conjecture/build.gradle +1 -1
  157. data/tracks/kotlin/exercises/complex-numbers/build.gradle +1 -1
  158. data/tracks/kotlin/exercises/diamond/build.gradle +1 -1
  159. data/tracks/kotlin/exercises/difference-of-squares/build.gradle +1 -1
  160. data/tracks/kotlin/exercises/etl/build.gradle +1 -1
  161. data/tracks/kotlin/exercises/flatten-array/build.gradle +1 -1
  162. data/tracks/kotlin/exercises/forth/build.gradle +1 -1
  163. data/tracks/kotlin/exercises/gigasecond/build.gradle +1 -1
  164. data/tracks/kotlin/exercises/grade-school/build.gradle +1 -1
  165. data/tracks/kotlin/exercises/grains/build.gradle +1 -1
  166. data/tracks/kotlin/exercises/hamming/build.gradle +1 -1
  167. data/tracks/kotlin/exercises/hello-world/build.gradle +1 -1
  168. data/tracks/kotlin/exercises/hexadecimal/build.gradle +1 -1
  169. data/tracks/kotlin/exercises/isogram/build.gradle +1 -1
  170. data/tracks/kotlin/exercises/largest-series-product/build.gradle +1 -1
  171. data/tracks/kotlin/exercises/leap/build.gradle +1 -1
  172. data/tracks/kotlin/exercises/linked-list/build.gradle +1 -1
  173. data/tracks/kotlin/exercises/list-ops/build.gradle +1 -1
  174. data/tracks/kotlin/exercises/luhn/build.gradle +1 -1
  175. data/tracks/kotlin/exercises/meetup/build.gradle +1 -1
  176. data/tracks/kotlin/exercises/minesweeper/build.gradle +1 -1
  177. data/tracks/kotlin/exercises/nth-prime/build.gradle +1 -1
  178. data/tracks/kotlin/exercises/nucleotide-count/build.gradle +1 -1
  179. data/tracks/kotlin/exercises/pangram/build.gradle +1 -1
  180. data/tracks/kotlin/exercises/pascals-triangle/build.gradle +1 -1
  181. data/tracks/kotlin/exercises/perfect-numbers/build.gradle +1 -1
  182. data/tracks/kotlin/exercises/phone-number/build.gradle +1 -1
  183. data/tracks/kotlin/exercises/pig-latin/build.gradle +1 -1
  184. data/tracks/kotlin/exercises/prime-factors/build.gradle +1 -1
  185. data/tracks/kotlin/exercises/raindrops/build.gradle +1 -1
  186. data/tracks/kotlin/exercises/react/build.gradle +1 -1
  187. data/tracks/kotlin/exercises/rna-transcription/build.gradle +1 -1
  188. data/tracks/kotlin/exercises/robot-name/build.gradle +1 -1
  189. data/tracks/kotlin/exercises/robot-simulator/build.gradle +1 -1
  190. data/tracks/kotlin/exercises/roman-numerals/build.gradle +1 -1
  191. data/tracks/kotlin/exercises/rotational-cipher/build.gradle +1 -1
  192. data/tracks/kotlin/exercises/saddle-points/build.gradle +1 -1
  193. data/tracks/kotlin/exercises/say/build.gradle +1 -1
  194. data/tracks/kotlin/exercises/scrabble-score/build.gradle +1 -1
  195. data/tracks/kotlin/exercises/secret-handshake/build.gradle +1 -1
  196. data/tracks/kotlin/exercises/series/build.gradle +1 -1
  197. data/tracks/kotlin/exercises/sieve/build.gradle +1 -1
  198. data/tracks/kotlin/exercises/simple-cipher/README.md +4 -6
  199. data/tracks/kotlin/exercises/simple-cipher/build.gradle +1 -1
  200. data/tracks/kotlin/exercises/space-age/build.gradle +1 -1
  201. data/tracks/kotlin/exercises/spiral-matrix/build.gradle +1 -1
  202. data/tracks/kotlin/exercises/strain/build.gradle +1 -1
  203. data/tracks/kotlin/exercises/sublist/build.gradle +1 -1
  204. data/tracks/kotlin/exercises/sum-of-multiples/build.gradle +1 -1
  205. data/tracks/kotlin/exercises/triangle/build.gradle +1 -1
  206. data/tracks/kotlin/exercises/two-fer/build.gradle +1 -1
  207. data/tracks/kotlin/exercises/word-count/build.gradle +1 -1
  208. data/tracks/lua/.gitignore +1 -0
  209. data/tracks/lua/config.json +12 -0
  210. data/tracks/lua/exercises/isbn-verifier/README.md +52 -0
  211. data/tracks/lua/exercises/isbn-verifier/example.lua +16 -0
  212. data/tracks/lua/exercises/isbn-verifier/isbn-verifier_spec.lua +55 -0
  213. data/tracks/ocaml/.travis-ci.sh +1 -1
  214. data/tracks/ocaml/.travis.yml +1 -1
  215. data/tracks/ocaml/README.md +1 -1
  216. data/tracks/perl6/config.json +10 -0
  217. data/tracks/perl6/exercises/acronym/Acronym.pm6 +4 -0
  218. data/tracks/perl6/exercises/acronym/Example.pm6 +5 -0
  219. data/tracks/perl6/exercises/acronym/README.md +33 -0
  220. data/tracks/perl6/exercises/acronym/acronym.t +96 -0
  221. data/tracks/perl6/exercises/acronym/example.yaml +19 -0
  222. data/tracks/perl6/exercises/word-count/Example.pm6 +1 -1
  223. data/tracks/perl6/exercises/word-count/WordCount.pm6 +1 -1
  224. data/tracks/perl6/exercises/word-count/example.yaml +2 -2
  225. data/tracks/perl6/exercises/word-count/word-count.t +11 -2
  226. data/tracks/pony/docs/RESOURCES.md +1 -1
  227. data/tracks/purescript/docs/INSTALLATION.md +1 -3
  228. data/tracks/python/config.json +1 -1
  229. data/tracks/r/exercises/word-count/test_word-count.R +5 -0
  230. data/tracks/ruby/README.md +73 -10
  231. data/tracks/rust/config.json +34 -0
  232. data/tracks/rust/exercises/book-store/Cargo.toml +1 -1
  233. data/tracks/rust/exercises/book-store/tests/book-store.rs +7 -0
  234. data/tracks/rust/exercises/diffie-hellman/.gitignore +9 -0
  235. data/tracks/rust/exercises/diffie-hellman/Cargo-example.toml +6 -0
  236. data/tracks/rust/exercises/diffie-hellman/Cargo.toml +5 -0
  237. data/tracks/rust/exercises/diffie-hellman/README.md +77 -0
  238. data/tracks/rust/exercises/diffie-hellman/example.rs +15 -0
  239. data/tracks/rust/exercises/diffie-hellman/src/lib.rs +11 -0
  240. data/tracks/rust/exercises/diffie-hellman/tests/diffie-hellman.rs +60 -0
  241. data/tracks/rust/exercises/macros/.gitignore +3 -0
  242. data/tracks/rust/exercises/macros/.meta/description.md +29 -0
  243. data/tracks/rust/exercises/macros/.meta/metadata.yml +3 -0
  244. data/tracks/rust/exercises/macros/Cargo.toml +6 -0
  245. data/tracks/rust/exercises/macros/README.md +70 -0
  246. data/tracks/rust/exercises/macros/example.rs +16 -0
  247. data/tracks/rust/exercises/macros/src/lib.rs +6 -0
  248. data/tracks/rust/exercises/macros/tests/macros.rs +62 -0
  249. data/tracks/rust/exercises/simple-linked-list/.gitignore +7 -0
  250. data/tracks/rust/exercises/simple-linked-list/.meta/hints.md +34 -0
  251. data/tracks/rust/exercises/simple-linked-list/Cargo.toml +5 -0
  252. data/tracks/rust/exercises/simple-linked-list/README.md +96 -0
  253. data/tracks/rust/exercises/simple-linked-list/example.rs +87 -0
  254. data/tracks/rust/exercises/simple-linked-list/src/lib.rs +46 -0
  255. data/tracks/rust/exercises/simple-linked-list/tests/simple-linked-list.rs +91 -0
  256. data/tracks/swift/.travis.yml +1 -1
  257. data/tracks/swift/config.json +24 -0
  258. data/tracks/swift/exercises/isbn-verifier/Package.swift +5 -0
  259. data/tracks/swift/exercises/isbn-verifier/README.md +39 -0
  260. data/tracks/swift/exercises/isbn-verifier/Sources/IsbnVerifier.swift +1 -0
  261. data/tracks/swift/exercises/isbn-verifier/Sources/IsbnVerifierExample.swift +35 -0
  262. data/tracks/swift/exercises/isbn-verifier/Tests/IsbnVerifierTests/IsbnVerifierTests.swift +75 -0
  263. data/tracks/swift/exercises/isbn-verifier/Tests/LinuxMain.swift +6 -0
  264. data/tracks/swift/exercises/two-fer/Package.swift +5 -0
  265. data/tracks/swift/exercises/two-fer/README.md +54 -0
  266. data/tracks/swift/exercises/two-fer/Sources/TwoFer.swift +1 -0
  267. data/tracks/swift/exercises/two-fer/Sources/TwoFerExample.swift +6 -0
  268. data/tracks/swift/exercises/two-fer/Tests/LinuxMain.swift +6 -0
  269. data/tracks/swift/exercises/two-fer/Tests/TwoFerTests/TwoFerTests.swift +25 -0
  270. metadata +71 -2
@@ -0,0 +1,49 @@
1
+ # Linked List
2
+
3
+ Implement a doubly linked list.
4
+
5
+ Like an array, a linked list is a simple linear data structure. Several
6
+ common data types can be implemented using linked lists, like queues,
7
+ stacks, and associative arrays.
8
+
9
+ A linked list is a collection of data elements called *nodes*. In a
10
+ *singly linked list* each node holds a value and a link to the next node.
11
+ In a *doubly linked list* each node also holds a link to the previous
12
+ node.
13
+
14
+ You will write an implementation of a doubly linked list. Implement a
15
+ Node to hold a value and pointers to the next and previous nodes. Then
16
+ implement a List which holds references to the first and last node and
17
+ offers an array-like interface for adding and removing items:
18
+
19
+ * `push` (*insert value at back*);
20
+ * `pop` (*remove value at back*);
21
+ * `shift` (*remove value at front*).
22
+ * `unshift` (*insert value at front*);
23
+
24
+ To keep your implementation simple, the tests will not cover error
25
+ conditions. Specifically: `pop` or `shift` will never be called on an
26
+ empty list.
27
+
28
+ If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list).
29
+
30
+ For installation and learning resources, refer to the
31
+ [exercism help page](http://exercism.io/languages/groovy).
32
+
33
+ # Running the tests
34
+
35
+ You can run all the tests for an exercise by entering
36
+
37
+ ```
38
+ $ groovy ./LinkedListSpec.groovy
39
+ ```
40
+
41
+ in your terminal.
42
+
43
+ ## Source
44
+
45
+ Classic computer science topic
46
+
47
+ ## Submitting Incomplete Solutions
48
+
49
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -17,7 +17,7 @@ for file in $modded_files
17
17
  do if [[ $file == exercises* ]] || [[ $file == config.json ]]
18
18
  then
19
19
  for file2 in $modded_files
20
- do if [[ $file2 == exercises* ]]
20
+ do if [[ $file2 == exercises* ]] && [[ $file2 != exercises/settings.gradle ]]
21
21
  then modded_exercise=${file2#exercises/}
22
22
  modded_exercise=${modded_exercise%%/*}
23
23
  if [[ $last_modded_exercise != $modded_exercise ]]
@@ -23,6 +23,16 @@
23
23
  "unlocked_by": null,
24
24
  "uuid": "74515d45-565b-4be2-96c4-77e58efa9257"
25
25
  },
26
+ {
27
+ "core": false,
28
+ "difficulty": 1,
29
+ "slug": "reverse-string",
30
+ "topics": [
31
+ "strings"
32
+ ],
33
+ "unlocked_by": "two-fer",
34
+ "uuid": "2c8afeed-480e-41f3-ad58-590fa8f88029"
35
+ },
26
36
  {
27
37
  "core": false,
28
38
  "difficulty": 2,
@@ -53,6 +53,13 @@
53
53
  "github_username": "FridaTveit",
54
54
  "name": "Frida Johanne Tveit",
55
55
  "show_on_website": true
56
+ },
57
+ {
58
+ "alumnus": false,
59
+ "bio": "I am a software developer and consultant working for Black Pepper Software, a software company based in Leamington Spa, England. I'm a recent Computer Science graduate from the University of Warwick, and love all things to do with computers!",
60
+ "github_username": "sjwarner-bp",
61
+ "name": "Sam Warner",
62
+ "show_on_website": true
56
63
  }
57
64
  ]
58
- }
65
+ }
@@ -23,9 +23,9 @@ As a maintainer, you have write access to several repositories. "write access"
23
23
 
24
24
  ## Maintainer Guides
25
25
 
26
- - **[exercism.io/docs/maintaining-a-track.md](https://github.com/exercism/exercism.io/blob/master/docs/maintaining-a-track.md)**
27
- - [exercism.io/docs/getting-involved-in-a-track.md](https://github.com/exercism/exercism.io/blob/master/docs/getting-involved-in-a-track.md)
28
- - [exercism.io/docs/reviewing-a-pull-request.md](https://github.com/exercism/exercism.io/blob/master/docs/reviewing-a-pull-request.md)
26
+ - **[docs/maintaining-a-track/README.md](https://github.com/exercism/docs/blob/master/maintaining-a-track/README.md)**
27
+ - [docs/contributing-to-language-tracks/README.md](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md)
28
+ - [docs/you-can-help/review-pull-requests.md](https://github.com/exercism/docs/blob/master/you-can-help/review-pull-requests.md)
29
29
 
30
30
  ## Miscellaneous
31
31
 
@@ -2,9 +2,9 @@ import java.util.ArrayList;
2
2
  import java.util.List;
3
3
  import java.util.function.Function;
4
4
 
5
- public class Accumulate {
5
+ class Accumulate {
6
6
 
7
- public static <T> List<T> accumulate(List<T> collection, Function<T, T> function) {
7
+ static <T> List<T> accumulate(List<T> collection, Function<T, T> function) {
8
8
  List<T> newCollection = new ArrayList<>();
9
9
 
10
10
  for (T item : collection) {
@@ -1,14 +1,14 @@
1
- public class Binary {
1
+ class Binary {
2
2
 
3
3
  private String binary;
4
4
  private int decimal;
5
5
 
6
- public Binary(String binary) {
6
+ Binary(String binary) {
7
7
  this.binary = binary;
8
8
  this.decimal = getDecimalFromBinary(binary);
9
9
  }
10
10
 
11
- public int getDecimal() {
11
+ int getDecimal() {
12
12
  return decimal;
13
13
  }
14
14
 
@@ -1,4 +1,4 @@
1
- public class BufferIOException extends Exception {
1
+ class BufferIOException extends Exception {
2
2
 
3
3
  BufferIOException(String message) {
4
4
  super(message);
@@ -1,17 +1,17 @@
1
1
  import java.util.LinkedList;
2
2
  import java.util.Queue;
3
3
 
4
- public class CircularBuffer<T> {
4
+ class CircularBuffer<T> {
5
5
 
6
6
  private Queue<T> buffer;
7
7
  private int capacity;
8
8
 
9
- public CircularBuffer(int size) {
9
+ CircularBuffer(int size) {
10
10
  this.buffer = new LinkedList<>();
11
11
  this.capacity = size;
12
12
  }
13
13
 
14
- public T read() throws BufferIOException {
14
+ T read() throws BufferIOException {
15
15
  if (this.buffer.size() == 0) {
16
16
  throw new BufferIOException("Tried to read from empty buffer");
17
17
  }
@@ -19,14 +19,14 @@ public class CircularBuffer<T> {
19
19
  return this.buffer.remove();
20
20
  }
21
21
 
22
- public void write(T data) throws BufferIOException {
22
+ void write(T data) throws BufferIOException {
23
23
  if (this.buffer.size() == this.capacity) {
24
24
  throw new BufferIOException("Tried to write to full buffer");
25
25
  }
26
26
 
27
27
  this.buffer.add(data);
28
28
  }
29
- public void overwrite(T data) {
29
+ void overwrite(T data) {
30
30
  if (this.buffer.size() == this.capacity) {
31
31
  this.buffer.remove();
32
32
  }
@@ -34,7 +34,7 @@ public class CircularBuffer<T> {
34
34
  this.buffer.add(data);
35
35
  }
36
36
 
37
- public void clear() {
37
+ void clear() {
38
38
  this.buffer.clear();
39
39
  }
40
40
  }
@@ -1,4 +1,4 @@
1
- public class BufferIOException extends Exception {
1
+ class BufferIOException extends Exception {
2
2
 
3
3
  BufferIOException(String message) {
4
4
  super(message);
@@ -1,17 +1,17 @@
1
- public class Clock {
1
+ class Clock {
2
2
  private static final int MINUTES_IN_AN_HOUR = 60;
3
3
  private static final int HOURS_IN_A_DAY = 24;
4
4
 
5
5
  private int hours;
6
6
  private int minutes;
7
7
 
8
- public Clock(int hours, int minutes) {
8
+ Clock(int hours, int minutes) {
9
9
  this.hours = hours;
10
10
  this.minutes = minutes;
11
11
  sanitiseTime();
12
12
  }
13
13
 
14
- public void add(int minutes) {
14
+ void add(int minutes) {
15
15
  this.minutes += minutes;
16
16
  sanitiseTime();
17
17
  }
@@ -1,21 +1,21 @@
1
1
  import java.util.ArrayList;
2
2
  import java.util.List;
3
3
 
4
- public class Crypto {
4
+ class Crypto {
5
5
 
6
6
  private String normalizedPlaintext;
7
7
  private int squareSize;
8
8
 
9
- public Crypto(String text) {
9
+ Crypto(String text) {
10
10
  this.normalizedPlaintext = normalizeText(text);
11
11
  this.squareSize = calculateSquareSize(normalizedPlaintext);
12
12
  }
13
13
 
14
- public String getNormalizedPlaintext() {
14
+ String getNormalizedPlaintext() {
15
15
  return normalizedPlaintext;
16
16
  }
17
17
 
18
- public int getSquareSize() {
18
+ int getSquareSize() {
19
19
  return squareSize;
20
20
  }
21
21
 
@@ -30,7 +30,7 @@ public class Crypto {
30
30
  return (int) Math.ceil(Math.sqrt(text.length()));
31
31
  }
32
32
 
33
- public List<String> getPlaintextSegments() {
33
+ List<String> getPlaintextSegments() {
34
34
  return getSegmentText(normalizedPlaintext, squareSize);
35
35
  }
36
36
 
@@ -50,11 +50,11 @@ public class Crypto {
50
50
  return segments;
51
51
  }
52
52
 
53
- public String getCipherText() {
53
+ String getCipherText() {
54
54
  return getNormalizedCipherText().replaceAll("\\s", "");
55
55
  }
56
56
 
57
- public String getNormalizedCipherText() {
57
+ String getNormalizedCipherText() {
58
58
  StringBuilder cipherText = new StringBuilder(normalizedPlaintext.length());
59
59
 
60
60
  for (int index = 0; index < squareSize; index++) {
@@ -2,8 +2,8 @@ import java.util.HashMap;
2
2
  import java.util.List;
3
3
  import java.util.Map;
4
4
 
5
- public class Etl {
6
- public Map<String, Integer> transform(Map<Integer, List<String>> old) {
5
+ class Etl {
6
+ Map<String, Integer> transform(Map<Integer, List<String>> old) {
7
7
  final Map<String, Integer> result = new HashMap<String, Integer>();
8
8
  for (Map.Entry<Integer, List<String>> e : old.entrySet()) {
9
9
  for (String s : e.getValue()) {
@@ -1,8 +1,8 @@
1
1
  import java.util.List;
2
2
  import java.util.Map;
3
3
 
4
- public class Etl {
5
- public Map<String, Integer> transform(Map<Integer, List<String>> old) {
4
+ class Etl {
5
+ Map<String, Integer> transform(Map<Integer, List<String>> old) {
6
6
  throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
7
7
  }
8
8
  }
@@ -3,7 +3,7 @@ import java.util.List;
3
3
  import java.util.ArrayList;
4
4
 
5
5
 
6
- public class KindergartenGarden {
6
+ class KindergartenGarden {
7
7
  private String[] students;
8
8
  private String garden;
9
9
  private static final int PLANTS_PER_STUDENT_PER_ROW = 2;
@@ -15,18 +15,18 @@ public class KindergartenGarden {
15
15
  "Ileana", "Joseph", "Kincaid", "Larry"
16
16
  };
17
17
 
18
- public KindergartenGarden(String garden, String[] students) {
18
+ KindergartenGarden(String garden, String[] students) {
19
19
  this.garden = garden;
20
20
  Arrays.sort(students);
21
21
  this.students = students;
22
22
  newRowLocation = garden.indexOf('\n') + 1;
23
23
  }
24
24
 
25
- public KindergartenGarden(String garden) {
25
+ KindergartenGarden(String garden) {
26
26
  this(garden, DEFAULT_STUDENTS);
27
27
  }
28
28
 
29
- public List<Plant> getPlantsOfStudent(String student) {
29
+ List<Plant> getPlantsOfStudent(String student) {
30
30
  List<Plant> plants = new ArrayList<Plant>();
31
31
  int studentPlantsIndex = Arrays.binarySearch(students, student) * PLANTS_PER_STUDENT_PER_ROW;
32
32
 
@@ -1,10 +1,10 @@
1
- public enum Plant {
1
+ enum Plant {
2
2
  VIOLETS,
3
3
  RADISHES,
4
4
  CLOVER,
5
5
  GRASS;
6
6
 
7
- public static Plant getPlant(char plantCode) {
7
+ static Plant getPlant(char plantCode) {
8
8
  switch (plantCode) {
9
9
  case 'G':
10
10
  return GRASS;
@@ -1,10 +1,10 @@
1
- public enum Plant {
1
+ enum Plant {
2
2
  VIOLETS,
3
3
  RADISHES,
4
4
  CLOVER,
5
5
  GRASS;
6
6
 
7
- public static Plant getPlant(char plantCode) {
7
+ static Plant getPlant(char plantCode) {
8
8
  switch (plantCode) {
9
9
  case 'G':
10
10
  return GRASS;
@@ -1,7 +1,7 @@
1
1
  import java.util.stream.IntStream;
2
2
 
3
- public final class PrimeCalculator {
4
- public int nth(int nth) {
3
+ final class PrimeCalculator {
4
+ int nth(int nth) {
5
5
  if (nth < 1) {
6
6
  throw new IllegalArgumentException();
7
7
  }
@@ -0,0 +1,7 @@
1
+ class ReverseString {
2
+
3
+ String reverse(String inputString) {
4
+ return new StringBuffer(inputString).reverse().toString();
5
+ }
6
+
7
+ }
@@ -0,0 +1,25 @@
1
+ # reverse-string
2
+
3
+ Reverse a string
4
+
5
+ For example:
6
+ input: "cool"
7
+ output: "looc"
8
+
9
+ # Running the tests
10
+
11
+ You can run all the tests for an exercise by entering
12
+
13
+ ```sh
14
+ $ gradle test
15
+ ```
16
+
17
+ in your terminal.
18
+
19
+ ## Source
20
+
21
+ Introductory challenge to reverse an input string [https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb](https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb)
22
+
23
+ ## Submitting Incomplete Solutions
24
+
25
+ It's possible to submit an incomplete solution so you can see how others have completed the exercise.
@@ -0,0 +1,17 @@
1
+ apply plugin: "java"
2
+ apply plugin: "eclipse"
3
+ apply plugin: "idea"
4
+
5
+ repositories {
6
+ mavenCentral()
7
+ }
8
+
9
+ dependencies {
10
+ testCompile "junit:junit:4.12"
11
+ }
12
+ test {
13
+ testLogging {
14
+ exceptionFormat = 'full'
15
+ events = ["passed", "failed", "skipped"]
16
+ }
17
+ }
@@ -0,0 +1,7 @@
1
+ class ReverseString {
2
+
3
+ String reverse() {
4
+ throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
5
+ }
6
+
7
+ }
@@ -0,0 +1,37 @@
1
+ import org.junit.Ignore;
2
+ import org.junit.Test;
3
+
4
+ import static org.junit.Assert.assertEquals;
5
+
6
+ public class ReverseStringTest {
7
+
8
+ @Test
9
+ public void testAnEmptyString() {
10
+ assertEquals("", new ReverseString().reverse(""));
11
+ }
12
+
13
+ @Ignore("Remove to run test")
14
+ @Test
15
+ public void testAWord() {
16
+ assertEquals("tobor", new ReverseString().reverse("robot"));
17
+ }
18
+
19
+ @Ignore("Remove to run test")
20
+ @Test
21
+ public void testACapitalizedWord() {
22
+ assertEquals("nemaR", new ReverseString().reverse("Ramen"));
23
+ }
24
+
25
+ @Ignore("Remove to run test")
26
+ @Test
27
+ public void testASentenceWithPunctuation() {
28
+ assertEquals("!yrgnuh m'I", new ReverseString().reverse("I'm hungry!"));
29
+ }
30
+
31
+ @Ignore("Remove to run test")
32
+ @Test
33
+ public void testAPalindrome() {
34
+ assertEquals("racecar", new ReverseString().reverse("racecar"));
35
+ }
36
+
37
+ }