trackler 2.2.1.94 → 2.2.1.95
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/anagram/canonical-data.json +1 -37
- data/tracks/crystal/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/java/exercises/prime-factors/.meta/hints.md +58 -0
- data/tracks/java/exercises/prime-factors/README.md +62 -0
- data/tracks/java/exercises/robot-name/.meta/hints.md +58 -0
- data/tracks/java/exercises/robot-name/README.md +62 -0
- data/tracks/java/exercises/robot-simulator/src/test/java/RobotTest.java +9 -5
- data/tracks/java/exercises/run-length-encoding/.meta/hints.md +58 -0
- data/tracks/java/exercises/run-length-encoding/README.md +62 -0
- data/tracks/javascript/config/exercise_readme.go.tmpl +26 -4
- data/tracks/javascript/exercises/accumulate/README.md +16 -16
- data/tracks/javascript/exercises/acronym/README.md +15 -13
- data/tracks/javascript/exercises/all-your-base/README.md +16 -14
- data/tracks/javascript/exercises/allergies/README.md +15 -13
- data/tracks/javascript/exercises/alphametics/README.md +17 -15
- data/tracks/javascript/exercises/anagram/README.md +15 -12
- data/tracks/javascript/exercises/atbash-cipher/README.md +17 -13
- data/tracks/javascript/exercises/beer-song/README.md +17 -14
- data/tracks/javascript/exercises/binary/README.md +17 -12
- data/tracks/javascript/exercises/binary-search/README.md +15 -12
- data/tracks/javascript/exercises/binary-search-tree/README.md +15 -12
- data/tracks/javascript/exercises/bob/README.md +17 -12
- data/tracks/javascript/exercises/bowling/README.md +38 -21
- data/tracks/javascript/exercises/bracket-push/README.md +15 -12
- data/tracks/javascript/exercises/change/README.md +31 -17
- data/tracks/javascript/exercises/circular-buffer/README.md +28 -18
- data/tracks/javascript/exercises/clock/README.md +15 -12
- data/tracks/javascript/exercises/collatz-conjecture/README.md +15 -12
- data/tracks/javascript/exercises/connect/README.md +17 -16
- data/tracks/javascript/exercises/crypto-square/README.md +25 -20
- data/tracks/javascript/exercises/custom-set/README.md +15 -13
- data/tracks/javascript/exercises/diamond/README.md +21 -18
- data/tracks/javascript/exercises/difference-of-squares/README.md +16 -13
- data/tracks/javascript/exercises/diffie-hellman/README.md +15 -17
- data/tracks/javascript/exercises/etl/README.md +18 -13
- data/tracks/javascript/exercises/flatten-array/README.md +16 -14
- data/tracks/javascript/exercises/food-chain/README.md +16 -13
- data/tracks/javascript/exercises/forth/README.md +17 -18
- data/tracks/javascript/exercises/gigasecond/README.md +15 -12
- data/tracks/javascript/exercises/grade-school/README.md +15 -13
- data/tracks/javascript/exercises/grains/README.md +15 -13
- data/tracks/javascript/exercises/hamming/README.md +15 -12
- data/tracks/javascript/exercises/hello-world/README.md +15 -12
- data/tracks/javascript/exercises/hexadecimal/README.md +15 -12
- data/tracks/javascript/exercises/isbn-verifier/README.md +44 -36
- data/tracks/javascript/exercises/isogram/README.md +17 -13
- data/tracks/javascript/exercises/kindergarten-garden/README.md +28 -25
- data/tracks/javascript/exercises/largest-series-product/README.md +15 -12
- data/tracks/javascript/exercises/leap/README.md +16 -13
- data/tracks/javascript/exercises/linked-list/README.md +25 -22
- data/tracks/javascript/exercises/list-ops/README.md +15 -13
- data/tracks/javascript/exercises/luhn/README.md +22 -19
- data/tracks/javascript/exercises/matrix/README.md +21 -16
- data/tracks/javascript/exercises/meetup/README.md +31 -25
- data/tracks/javascript/exercises/minesweeper/README.md +15 -13
- data/tracks/javascript/exercises/nth-prime/README.md +15 -12
- data/tracks/javascript/exercises/nucleotide-count/README.md +23 -34
- data/tracks/javascript/exercises/ocr-numbers/README.md +21 -18
- data/tracks/javascript/exercises/octal/README.md +21 -14
- data/tracks/javascript/exercises/palindrome-products/README.md +29 -27
- data/tracks/javascript/exercises/pangram/README.md +16 -13
- data/tracks/javascript/exercises/pascals-triangle/README.md +17 -14
- data/tracks/javascript/exercises/perfect-numbers/README.md +17 -14
- data/tracks/javascript/exercises/phone-number/README.md +19 -15
- data/tracks/javascript/exercises/pig-latin/README.md +15 -12
- data/tracks/javascript/exercises/point-mutations/README.md +15 -12
- data/tracks/javascript/exercises/prime-factors/README.md +15 -12
- data/tracks/javascript/exercises/protein-translation/README.md +19 -17
- data/tracks/javascript/exercises/proverb/README.md +29 -21
- data/tracks/javascript/exercises/pythagorean-triplet/README.md +18 -15
- data/tracks/javascript/exercises/queen-attack/README.md +16 -13
- data/tracks/javascript/exercises/raindrops/README.md +15 -12
- data/tracks/javascript/exercises/reverse-string/README.md +19 -15
- data/tracks/javascript/exercises/rna-transcription/README.md +16 -13
- data/tracks/javascript/exercises/robot-name/README.md +15 -12
- data/tracks/javascript/exercises/robot-simulator/README.md +15 -12
- data/tracks/javascript/exercises/roman-numerals/README.md +16 -13
- data/tracks/javascript/exercises/run-length-encoding/README.md +19 -16
- data/tracks/javascript/exercises/saddle-points/README.md +16 -13
- data/tracks/javascript/exercises/say/README.md +15 -12
- data/tracks/javascript/exercises/scrabble-score/README.md +18 -13
- data/tracks/javascript/exercises/secret-handshake/README.md +16 -13
- data/tracks/javascript/exercises/series/README.md +15 -12
- data/tracks/javascript/exercises/sieve/README.md +15 -12
- data/tracks/javascript/exercises/simple-cipher/README.md +19 -18
- data/tracks/javascript/exercises/simple-linked-list/README.md +15 -12
- data/tracks/javascript/exercises/space-age/README.md +16 -13
- data/tracks/javascript/exercises/strain/README.md +15 -12
- data/tracks/javascript/exercises/sublist/README.md +14 -17
- data/tracks/javascript/exercises/sum-of-multiples/README.md +19 -19
- data/tracks/javascript/exercises/transpose/README.md +15 -12
- data/tracks/javascript/exercises/triangle/README.md +24 -18
- data/tracks/javascript/exercises/trinary/README.md +16 -13
- data/tracks/javascript/exercises/twelve-days/README.md +17 -16
- data/tracks/javascript/exercises/two-bucket/README.md +25 -22
- data/tracks/javascript/exercises/two-fer/README.md +19 -14
- data/tracks/javascript/exercises/word-count/README.md +16 -14
- data/tracks/javascript/exercises/wordy/README.md +15 -17
- data/tracks/javascript/exercises/zipper/README.md +20 -18
- data/tracks/perl6/docs/ABOUT.md +12 -21
- metadata +6 -4
- data/tracks/javascript/docs/EXERCISE_README_INSERT.md +0 -22
@@ -31,26 +31,29 @@ You can check this yourself:
|
|
31
31
|
|
32
32
|
## Setup
|
33
33
|
|
34
|
-
Go through the setup instructions for JavaScript to
|
35
|
-
|
34
|
+
Go through the setup instructions for JavaScript to install the
|
35
|
+
necessary dependencies:
|
36
36
|
|
37
37
|
http://exercism.io/languages/javascript/installation
|
38
38
|
|
39
|
-
##
|
39
|
+
## Running the test suite
|
40
40
|
|
41
|
-
|
41
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
42
|
+
You can install it by opening a terminal window and running the
|
43
|
+
following command:
|
42
44
|
|
43
|
-
|
45
|
+
```sh
|
46
|
+
npm install -g jasmine
|
47
|
+
```
|
44
48
|
|
45
|
-
|
46
|
-
test the Hello World exercise:
|
49
|
+
Run the test suite from the exercise directory with:
|
47
50
|
|
48
|
-
|
51
|
+
```sh
|
52
|
+
jasmine prime-factors.spec.js
|
53
|
+
```
|
49
54
|
|
50
|
-
In many test suites all but the first test have been
|
51
|
-
|
52
|
-
Once you get a test passing, you can unskip the next one by
|
53
|
-
changing `xit` to `it`.
|
55
|
+
In many test suites all but the first test have been marked "pending".
|
56
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
54
57
|
|
55
58
|
## Source
|
56
59
|
|
@@ -10,17 +10,17 @@ Codons: `"AUG", "UUU", "UCU"`
|
|
10
10
|
=> which become a polypeptide with the following sequence =>
|
11
11
|
|
12
12
|
Protein: `"Methionine", "Phenylalanine", "Serine"`
|
13
|
-
|
13
|
+
|
14
14
|
There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise. If it works for one codon, the program should work for all of them.
|
15
|
-
However, feel free to expand the list in the test suite to include them all.
|
15
|
+
However, feel free to expand the list in the test suite to include them all.
|
16
16
|
|
17
|
-
There are also
|
17
|
+
There are also three terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated.
|
18
18
|
|
19
19
|
All subsequent codons after are ignored, like this:
|
20
20
|
|
21
21
|
RNA: `"AUGUUUUCUUAAAUG"` =>
|
22
22
|
|
23
|
-
Codons: `"AUG", "UUU", "UCU", "UAG", "AUG"` =>
|
23
|
+
Codons: `"AUG", "UUU", "UCU", "UAG", "AUG"` =>
|
24
24
|
|
25
25
|
Protein: `"Methionine", "Phenylalanine", "Serine"`
|
26
26
|
|
@@ -39,31 +39,33 @@ UGU, UGC | Cysteine
|
|
39
39
|
UGG | Tryptophan
|
40
40
|
UAA, UAG, UGA | STOP
|
41
41
|
|
42
|
-
|
43
42
|
Learn more about [protein translation on Wikipedia](http://en.wikipedia.org/wiki/Translation_(biology))
|
44
43
|
|
45
44
|
## Setup
|
46
45
|
|
47
|
-
Go through the setup instructions for JavaScript to
|
48
|
-
|
46
|
+
Go through the setup instructions for JavaScript to install the
|
47
|
+
necessary dependencies:
|
49
48
|
|
50
49
|
http://exercism.io/languages/javascript/installation
|
51
50
|
|
52
|
-
##
|
53
|
-
|
54
|
-
Execute the tests with:
|
51
|
+
## Running the test suite
|
55
52
|
|
56
|
-
|
53
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
54
|
+
You can install it by opening a terminal window and running the
|
55
|
+
following command:
|
57
56
|
|
58
|
-
|
59
|
-
|
57
|
+
```sh
|
58
|
+
npm install -g jasmine
|
59
|
+
```
|
60
60
|
|
61
|
-
|
61
|
+
Run the test suite from the exercise directory with:
|
62
62
|
|
63
|
-
|
63
|
+
```sh
|
64
|
+
jasmine protein-translation.spec.js
|
65
|
+
```
|
64
66
|
|
65
|
-
|
66
|
-
changing `xit` to `it`.
|
67
|
+
In many test suites all but the first test have been marked "pending".
|
68
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
67
69
|
|
68
70
|
## Source
|
69
71
|
|
@@ -1,38 +1,46 @@
|
|
1
1
|
# Proverb
|
2
2
|
|
3
|
-
For want of a horseshoe nail, a kingdom was lost, or so the saying goes.
|
4
|
-
the full text of this proverbial rhyme:
|
3
|
+
For want of a horseshoe nail, a kingdom was lost, or so the saying goes.
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
Given a list of inputs, generate the relevant proverb. For example, given the list `["nail", "shoe", "horse", "rider", "message", "battle", "kingdom"]`, you will output the full text of this proverbial rhyme:
|
6
|
+
|
7
|
+
```text
|
8
|
+
For want of a nail the shoe was lost.
|
9
|
+
For want of a shoe the horse was lost.
|
10
|
+
For want of a horse the rider was lost.
|
11
|
+
For want of a rider the message was lost.
|
12
|
+
For want of a message the battle was lost.
|
13
|
+
For want of a battle the kingdom was lost.
|
14
|
+
And all for the want of a nail.
|
15
|
+
```
|
16
|
+
|
17
|
+
Note that the list of inputs may vary; your solution should be able to handle lists of arbitrary length and content. No line of the output text should be a static, unchanging string; all should vary according to the input given.
|
13
18
|
|
14
19
|
## Setup
|
15
20
|
|
16
|
-
Go through the setup instructions for JavaScript to
|
17
|
-
|
21
|
+
Go through the setup instructions for JavaScript to install the
|
22
|
+
necessary dependencies:
|
18
23
|
|
19
24
|
http://exercism.io/languages/javascript/installation
|
20
25
|
|
21
|
-
##
|
22
|
-
|
23
|
-
Execute the tests with:
|
26
|
+
## Running the test suite
|
24
27
|
|
25
|
-
|
28
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
29
|
+
You can install it by opening a terminal window and running the
|
30
|
+
following command:
|
26
31
|
|
27
|
-
|
28
|
-
|
32
|
+
```sh
|
33
|
+
npm install -g jasmine
|
34
|
+
```
|
29
35
|
|
30
|
-
|
36
|
+
Run the test suite from the exercise directory with:
|
31
37
|
|
32
|
-
|
38
|
+
```sh
|
39
|
+
jasmine proverb.spec.js
|
40
|
+
```
|
33
41
|
|
34
|
-
|
35
|
-
changing `xit` to `it`.
|
42
|
+
In many test suites all but the first test have been marked "pending".
|
43
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
36
44
|
|
37
45
|
## Source
|
38
46
|
|
@@ -3,13 +3,13 @@
|
|
3
3
|
A Pythagorean triplet is a set of three natural numbers, {a, b, c}, for
|
4
4
|
which,
|
5
5
|
|
6
|
-
```
|
6
|
+
```text
|
7
7
|
a**2 + b**2 = c**2
|
8
8
|
```
|
9
9
|
|
10
|
-
For example,
|
10
|
+
For example,
|
11
11
|
|
12
|
-
```
|
12
|
+
```text
|
13
13
|
3**2 + 4**2 = 9 + 16 = 25 = 5**2.
|
14
14
|
```
|
15
15
|
|
@@ -19,26 +19,29 @@ Find the product a * b * c.
|
|
19
19
|
|
20
20
|
## Setup
|
21
21
|
|
22
|
-
Go through the setup instructions for JavaScript to
|
23
|
-
|
22
|
+
Go through the setup instructions for JavaScript to install the
|
23
|
+
necessary dependencies:
|
24
24
|
|
25
25
|
http://exercism.io/languages/javascript/installation
|
26
26
|
|
27
|
-
##
|
28
|
-
|
29
|
-
Execute the tests with:
|
27
|
+
## Running the test suite
|
30
28
|
|
31
|
-
|
29
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
30
|
+
You can install it by opening a terminal window and running the
|
31
|
+
following command:
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
```sh
|
34
|
+
npm install -g jasmine
|
35
|
+
```
|
35
36
|
|
36
|
-
|
37
|
+
Run the test suite from the exercise directory with:
|
37
38
|
|
38
|
-
|
39
|
+
```sh
|
40
|
+
jasmine pythagorean-triplet.spec.js
|
41
|
+
```
|
39
42
|
|
40
|
-
|
41
|
-
changing `xit` to `it`.
|
43
|
+
In many test suites all but the first test have been marked "pending".
|
44
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
42
45
|
|
43
46
|
## Source
|
44
47
|
|
@@ -11,7 +11,7 @@ A chessboard can be represented by an 8 by 8 array.
|
|
11
11
|
So if you're told the white queen is at (2, 3) and the black queen at
|
12
12
|
(5, 6), then you'd know you've got a set-up like so:
|
13
13
|
|
14
|
-
```
|
14
|
+
```text
|
15
15
|
_ _ _ _ _ _ _ _
|
16
16
|
_ _ _ _ _ _ _ _
|
17
17
|
_ _ _ W _ _ _ _
|
@@ -28,26 +28,29 @@ share a diagonal.
|
|
28
28
|
|
29
29
|
## Setup
|
30
30
|
|
31
|
-
Go through the setup instructions for JavaScript to
|
32
|
-
|
31
|
+
Go through the setup instructions for JavaScript to install the
|
32
|
+
necessary dependencies:
|
33
33
|
|
34
34
|
http://exercism.io/languages/javascript/installation
|
35
35
|
|
36
|
-
##
|
36
|
+
## Running the test suite
|
37
37
|
|
38
|
-
|
38
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
39
|
+
You can install it by opening a terminal window and running the
|
40
|
+
following command:
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
test the Hello World exercise:
|
42
|
+
```sh
|
43
|
+
npm install -g jasmine
|
44
|
+
```
|
44
45
|
|
45
|
-
|
46
|
+
Run the test suite from the exercise directory with:
|
46
47
|
|
47
|
-
|
48
|
+
```sh
|
49
|
+
jasmine queen-attack.spec.js
|
50
|
+
```
|
48
51
|
|
49
|
-
|
50
|
-
changing `xit` to `it`.
|
52
|
+
In many test suites all but the first test have been marked "pending".
|
53
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
51
54
|
|
52
55
|
## Source
|
53
56
|
|
@@ -19,26 +19,29 @@ Convert a number to a string, the contents of which depend on the number's facto
|
|
19
19
|
|
20
20
|
## Setup
|
21
21
|
|
22
|
-
Go through the setup instructions for JavaScript to
|
23
|
-
|
22
|
+
Go through the setup instructions for JavaScript to install the
|
23
|
+
necessary dependencies:
|
24
24
|
|
25
25
|
http://exercism.io/languages/javascript/installation
|
26
26
|
|
27
|
-
##
|
27
|
+
## Running the test suite
|
28
28
|
|
29
|
-
|
29
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
30
|
+
You can install it by opening a terminal window and running the
|
31
|
+
following command:
|
30
32
|
|
31
|
-
|
33
|
+
```sh
|
34
|
+
npm install -g jasmine
|
35
|
+
```
|
32
36
|
|
33
|
-
|
34
|
-
test the Hello World exercise:
|
37
|
+
Run the test suite from the exercise directory with:
|
35
38
|
|
36
|
-
|
39
|
+
```sh
|
40
|
+
jasmine raindrops.spec.js
|
41
|
+
```
|
37
42
|
|
38
|
-
In many test suites all but the first test have been
|
39
|
-
|
40
|
-
Once you get a test passing, you can unskip the next one by
|
41
|
-
changing `xit` to `it`.
|
43
|
+
In many test suites all but the first test have been marked "pending".
|
44
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
42
45
|
|
43
46
|
## Source
|
44
47
|
|
@@ -1,36 +1,40 @@
|
|
1
1
|
# Reverse String
|
2
2
|
|
3
|
+
Reverse a string
|
4
|
+
|
3
5
|
For example:
|
4
6
|
input: "cool"
|
5
7
|
output: "looc"
|
6
8
|
|
7
|
-
|
8
9
|
## Setup
|
9
10
|
|
10
|
-
Go through the setup instructions for JavaScript to
|
11
|
-
|
12
|
-
|
13
|
-
http://exercism.io/languages/javascript
|
11
|
+
Go through the setup instructions for JavaScript to install the
|
12
|
+
necessary dependencies:
|
14
13
|
|
15
|
-
|
14
|
+
http://exercism.io/languages/javascript/installation
|
16
15
|
|
17
|
-
|
16
|
+
## Running the test suite
|
18
17
|
|
19
|
-
|
18
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
19
|
+
You can install it by opening a terminal window and running the
|
20
|
+
following command:
|
20
21
|
|
21
|
-
|
22
|
-
|
22
|
+
```sh
|
23
|
+
npm install -g jasmine
|
24
|
+
```
|
23
25
|
|
24
|
-
|
26
|
+
Run the test suite from the exercise directory with:
|
25
27
|
|
26
|
-
|
28
|
+
```sh
|
29
|
+
jasmine reverse-string.spec.js
|
30
|
+
```
|
27
31
|
|
28
|
-
|
29
|
-
changing `xit` to `it`.
|
32
|
+
In many test suites all but the first test have been marked "pending".
|
33
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
30
34
|
|
31
35
|
## Source
|
32
36
|
|
33
|
-
|
37
|
+
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)
|
34
38
|
|
35
39
|
## Submitting Incomplete Solutions
|
36
40
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# RNA Transcription
|
2
2
|
|
3
3
|
Given a DNA strand, return its RNA complement (per RNA transcription).
|
4
4
|
|
@@ -20,26 +20,29 @@ each nucleotide with its complement:
|
|
20
20
|
|
21
21
|
## Setup
|
22
22
|
|
23
|
-
Go through the setup instructions for JavaScript to
|
24
|
-
|
23
|
+
Go through the setup instructions for JavaScript to install the
|
24
|
+
necessary dependencies:
|
25
25
|
|
26
26
|
http://exercism.io/languages/javascript/installation
|
27
27
|
|
28
|
-
##
|
28
|
+
## Running the test suite
|
29
29
|
|
30
|
-
|
30
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
31
|
+
You can install it by opening a terminal window and running the
|
32
|
+
following command:
|
31
33
|
|
32
|
-
|
34
|
+
```sh
|
35
|
+
npm install -g jasmine
|
36
|
+
```
|
33
37
|
|
34
|
-
|
35
|
-
test the Hello World exercise:
|
38
|
+
Run the test suite from the exercise directory with:
|
36
39
|
|
37
|
-
|
40
|
+
```sh
|
41
|
+
jasmine rna-transcription.spec.js
|
42
|
+
```
|
38
43
|
|
39
|
-
In many test suites all but the first test have been
|
40
|
-
|
41
|
-
Once you get a test passing, you can unskip the next one by
|
42
|
-
changing `xit` to `it`.
|
44
|
+
In many test suites all but the first test have been marked "pending".
|
45
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
43
46
|
|
44
47
|
## Source
|
45
48
|
|
@@ -17,26 +17,29 @@ every existing robot has a unique name.
|
|
17
17
|
|
18
18
|
## Setup
|
19
19
|
|
20
|
-
Go through the setup instructions for JavaScript to
|
21
|
-
|
20
|
+
Go through the setup instructions for JavaScript to install the
|
21
|
+
necessary dependencies:
|
22
22
|
|
23
23
|
http://exercism.io/languages/javascript/installation
|
24
24
|
|
25
|
-
##
|
25
|
+
## Running the test suite
|
26
26
|
|
27
|
-
|
27
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
28
|
+
You can install it by opening a terminal window and running the
|
29
|
+
following command:
|
28
30
|
|
29
|
-
|
31
|
+
```sh
|
32
|
+
npm install -g jasmine
|
33
|
+
```
|
30
34
|
|
31
|
-
|
32
|
-
test the Hello World exercise:
|
35
|
+
Run the test suite from the exercise directory with:
|
33
36
|
|
34
|
-
|
37
|
+
```sh
|
38
|
+
jasmine robot-name.spec.js
|
39
|
+
```
|
35
40
|
|
36
|
-
In many test suites all but the first test have been
|
37
|
-
|
38
|
-
Once you get a test passing, you can unskip the next one by
|
39
|
-
changing `xit` to `it`.
|
41
|
+
In many test suites all but the first test have been marked "pending".
|
42
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
40
43
|
|
41
44
|
## Source
|
42
45
|
|
@@ -29,26 +29,29 @@ direction it is pointing.
|
|
29
29
|
|
30
30
|
## Setup
|
31
31
|
|
32
|
-
Go through the setup instructions for JavaScript to
|
33
|
-
|
32
|
+
Go through the setup instructions for JavaScript to install the
|
33
|
+
necessary dependencies:
|
34
34
|
|
35
35
|
http://exercism.io/languages/javascript/installation
|
36
36
|
|
37
|
-
##
|
37
|
+
## Running the test suite
|
38
38
|
|
39
|
-
|
39
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
40
|
+
You can install it by opening a terminal window and running the
|
41
|
+
following command:
|
40
42
|
|
41
|
-
|
43
|
+
```sh
|
44
|
+
npm install -g jasmine
|
45
|
+
```
|
42
46
|
|
43
|
-
|
44
|
-
test the Hello World exercise:
|
47
|
+
Run the test suite from the exercise directory with:
|
45
48
|
|
46
|
-
|
49
|
+
```sh
|
50
|
+
jasmine robot-simulator.spec.js
|
51
|
+
```
|
47
52
|
|
48
|
-
In many test suites all but the first test have been
|
49
|
-
|
50
|
-
Once you get a test passing, you can unskip the next one by
|
51
|
-
changing `xit` to `it`.
|
53
|
+
In many test suites all but the first test have been marked "pending".
|
54
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
52
55
|
|
53
56
|
## Source
|
54
57
|
|
@@ -14,7 +14,7 @@ The Romans wrote numbers using letters - I, V, X, L, C, D, M. (notice
|
|
14
14
|
these letters have lots of straight lines and are hence easy to hack
|
15
15
|
into stone tablets).
|
16
16
|
|
17
|
-
```
|
17
|
+
```text
|
18
18
|
1 => I
|
19
19
|
10 => X
|
20
20
|
7 => VII
|
@@ -44,26 +44,29 @@ See also: http://www.novaroma.org/via_romana/numbers.html
|
|
44
44
|
|
45
45
|
## Setup
|
46
46
|
|
47
|
-
Go through the setup instructions for JavaScript to
|
48
|
-
|
47
|
+
Go through the setup instructions for JavaScript to install the
|
48
|
+
necessary dependencies:
|
49
49
|
|
50
50
|
http://exercism.io/languages/javascript/installation
|
51
51
|
|
52
|
-
##
|
53
|
-
|
54
|
-
Execute the tests with:
|
52
|
+
## Running the test suite
|
55
53
|
|
56
|
-
|
54
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
55
|
+
You can install it by opening a terminal window and running the
|
56
|
+
following command:
|
57
57
|
|
58
|
-
|
59
|
-
|
58
|
+
```sh
|
59
|
+
npm install -g jasmine
|
60
|
+
```
|
60
61
|
|
61
|
-
|
62
|
+
Run the test suite from the exercise directory with:
|
62
63
|
|
63
|
-
|
64
|
+
```sh
|
65
|
+
jasmine roman-numerals.spec.js
|
66
|
+
```
|
64
67
|
|
65
|
-
|
66
|
-
changing `xit` to `it`.
|
68
|
+
In many test suites all but the first test have been marked "pending".
|
69
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
67
70
|
|
68
71
|
## Source
|
69
72
|
|
@@ -7,44 +7,47 @@ Run-length encoding (RLE) is a simple form of data compression, where runs
|
|
7
7
|
|
8
8
|
For example we can represent the original 53 characters with only 13.
|
9
9
|
|
10
|
-
```
|
10
|
+
```text
|
11
11
|
"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" -> "12WB12W3B24WB"
|
12
12
|
```
|
13
13
|
|
14
14
|
RLE allows the original data to be perfectly reconstructed from
|
15
15
|
the compressed data, which makes it a lossless data compression.
|
16
16
|
|
17
|
-
```
|
17
|
+
```text
|
18
18
|
"AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE"
|
19
19
|
```
|
20
20
|
|
21
21
|
For simplicity, you can assume that the unencoded string will only contain
|
22
|
-
the letters A through Z (either lower or upper case) and whitespace. This way
|
23
|
-
data to be encoded will never contain any numbers and numbers inside data to
|
22
|
+
the letters A through Z (either lower or upper case) and whitespace. This way
|
23
|
+
data to be encoded will never contain any numbers and numbers inside data to
|
24
24
|
be decoded always represent the count for the following character.
|
25
25
|
|
26
26
|
## Setup
|
27
27
|
|
28
|
-
Go through the setup instructions for JavaScript to
|
29
|
-
|
28
|
+
Go through the setup instructions for JavaScript to install the
|
29
|
+
necessary dependencies:
|
30
30
|
|
31
31
|
http://exercism.io/languages/javascript/installation
|
32
32
|
|
33
|
-
##
|
34
|
-
|
35
|
-
Execute the tests with:
|
33
|
+
## Running the test suite
|
36
34
|
|
37
|
-
|
35
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
36
|
+
You can install it by opening a terminal window and running the
|
37
|
+
following command:
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
```sh
|
40
|
+
npm install -g jasmine
|
41
|
+
```
|
41
42
|
|
42
|
-
|
43
|
+
Run the test suite from the exercise directory with:
|
43
44
|
|
44
|
-
|
45
|
+
```sh
|
46
|
+
jasmine run-length-encoding.spec.js
|
47
|
+
```
|
45
48
|
|
46
|
-
|
47
|
-
changing `xit` to `it`.
|
49
|
+
In many test suites all but the first test have been marked "pending".
|
50
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
48
51
|
|
49
52
|
## Source
|
50
53
|
|