diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/taxicab-numbers.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/taxicab-numbers.english.md
index 2ae1f5014b..bbe08be270 100644
--- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/taxicab-numbers.english.md
+++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/taxicab-numbers.english.md
@@ -6,29 +6,29 @@ challengeType: 5
## Description
+
n
taxicab numbers. For each of the taxicab numbers, show the number as well as its constituent cubes.
+See also:
+
+
taxicabNumbers
is a function.
- testString: assert(typeof taxicabNumbers === 'function', 'taxicabNumbers
is a function.');
- - text: taxicabNumbers
should return an array.
- testString: assert(typeof taxicabNumbers(2) === 'object', 'taxicabNumbers
should return an array.');
- - text: taxicabNumbers
should return an array of numbers.
- testString: assert(typeof taxicabNumbers(100)[0] === 'number', 'taxicabNumbers
should return an array of numbers.');
- - text: taxicabNumbers(4)
must return [1729, 4104, 13832, 20683].
- testString: assert.deepEqual(taxicabNumbers(4), res4, 'taxicabNumbers(4)
must return [1729, 4104, 13832, 20683].');
- - text: taxicabNumbers(25) should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]
- testString: assert.deepEqual(taxicabNumbers(25), res25, 'taxicabNumbers(25) should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]');
- - text: taxicabNumbers(39) resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].
- testString: assert.deepEqual(taxicabNumbers(39).slice(20, 29), res39From20To29, 'taxicabNumbers(39) resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].');
+ - text: taxicabNumbers
is a function.
+ testString: assert(typeof taxicabNumbers === 'function', 'taxicabNumbers
is a function.');
+ - text: taxicabNumbers
should return an array.
+ testString: assert(typeof taxicabNumbers(2) === 'object', 'taxicabNumbers
should return an array.');
+ - text: taxicabNumbers
should return an array of numbers.
+ testString: assert(typeof taxicabNumbers(100)[0] === 'number', 'taxicabNumbers
should return an array of numbers.');
+ - text: taxicabNumbers(4)
must return [1729, 4104, 13832, 20683].
+ testString: assert.deepEqual(taxicabNumbers(4), res4, 'taxicabNumbers(4)
must return [1729, 4104, 13832, 20683].');
+ - text: taxicabNumbers(25)
should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]
+ testString: assert.deepEqual(taxicabNumbers(25), res25, 'taxicabNumbers(25)
should return [1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597]');
+ - text: taxicabNumbers(39)
resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].
+ testString: assert.deepEqual(taxicabNumbers(39).slice(20, 29), res39From20To29, 'taxicabNumbers(39)
resulting numbers from 20 - 29 should be [314496,320264,327763,373464,402597,439101,443889,513000,513856].');
```
@@ -59,7 +59,7 @@ tests:
Write a function or program that can split a string at each non-escaped occurrence of a separator character. -
-It should accept three input parameters: -
- The string - The separator character - The escape character -It should output a list of strings.
-Rules for splitting:
- The fields that were separated by the separators, become the elements of the output list. - Empty fields should be preserved, even at the start and end. -Rules for escaping:
- "Escaped" means preceded by an occurrence of the escape character that is not already escaped itself. - When the escape character precedes a character that has no special meaning, it still counts as an escape (but does not do anything special). - Each occurrences of the escape character that was used to escape something, should not become part of the output. -Demonstrate that your function satisfies the following test-case: - Given string
one^|uno||three^^^^|four^^^|^cuatro|and using -
|as a separator and
^as escape character, your - function should output the following array: - -
- ['one|uno', '', 'three^^', 'four^|quatro', ''] -+
one^|uno||three^^^^|four^^^|^cuatro|+and using
|
as a separator and ^
as escape character, your function should output the following array:
++ ['one|uno', '', 'three^^', 'four^|cuatro', ''] +
Find the top N ranked data in each group, where N is provided as a parameter. Name of the rank and the group are also provided as parameter.
+Find the topn
ranked data in each group, where n
is provided as a parameter. Name of the rank and the group are also provided as parameter.
Given the following data:
[ @@ -119,7 +118,6 @@ const testData2 = [ const res2 = topRankPerGroup(1, testData2, 'genre', 'rating'); const res3 = topRankPerGroup(2, testData2, 'genre', 'rating'); -//console.log(JSON.stringify(topRankPerGroup(10, testData1))); ```
-Given a mapping between items, and items they depend on, a -topological sort orders -items so that no item precedes an item it depends upon. -
--The compiling of a library in the -VHDL language -has the constraint that a library must be compiled after any library it depends on. -
-Task: -+Given a mapping between items, and items they depend on, a topological sort orders items so that no item precedes an item it depends upon. +The compiling of a library in the VHDL language has the constraint that a library must be compiled after any library it depends on. +
Use the following data as an example:
+LIBRARY LIBRARY DEPENDENCIES ======= ==================== @@ -42,29 +37,16 @@ ramlib std ieee std_cell_lib ieee std_cell_lib synopsys-
Note: the above data would be un-orderable if, for example, dw04
is added to the list of dependencies of dw01
.
-
There are two popular algorithms for topological sorting:
-- Kahn's 1962 topological sort, and depth-first search: - topological sort -
-- Jason Sachs: - - "Ten little algorithms, part 4: topological sort" - . -
-Solve the Towers of Hanoi problem.
-
-Your solution should accept the number of discs as the first parameters, and
-three string used to identify each of the three stacks of discs, for example
-towerOfHanoi(4, 'A', 'B', 'C')
. The function should return an
-array of arrays containing the list of moves, source -> destination. For
-example, the array [['A', 'C'], ['B', 'A']]
indicates that the
-1st move was to move a disc from stack A to C, and the 2nd move was to move a
-disc from stack B to A.
+Solve the Towers of Hanoi problem.
towerOfHanoi(4, 'A', 'B', 'C')
. The function should return an array of arrays containing the list of moves, source -> destination.
+For example, the array [['A', 'C'], ['B', 'A']]
indicates that the 1st move was to move a disc from stack A to C, and the 2nd move was to move a disc from stack B to A.