diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/100-doors.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/100-doors.english.md index dc9dc95dbc..77a4d5dfdd 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/100-doors.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/100-doors.english.md @@ -7,12 +7,11 @@ challengeType: 5 ## Description
There are 100 doors in a row that are all initially closed. You make 100 passes by the doors. The first time through, visit every door and 'toggle' the door (if the door is closed, open it; if it is open, close it). The second time, only visit every 2nd door (i.e., door #2, #4, #6, ...) and toggle it. The third time, visit every 3rd door (i.e., door #3, #6, #9, ...), etc., until you only visit the 100th door. -Implement a function to determine the state of the doors after the last pass. Return the final result in an array, with only the door number included in the array if it is open.
## Instructions
- +Implement a function to determine the state of the doors after the last pass. Return the final result in an array, with only the door number included in the array if it is open.
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/9-billion-names-of-god-the-integer.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/9-billion-names-of-god-the-integer.english.md index 32efe9be56..470c5ca42b 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/9-billion-names-of-god-the-integer.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/9-billion-names-of-god-the-integer.english.md @@ -6,14 +6,16 @@ challengeType: 5 ## Description
-This task is a variation of the short story by Arthur C. Clarke. +This task is a variation of the short story by Arthur C. Clarke. (Solvers should be aware of the consequences of completing this task.) In detail, to specify what is meant by a “name”: -The integer 1 has 1 name “1”. -The integer 2 has 2 names “1+1”, and “2”. -The integer 3 has 3 names “1+1+1”, “2+1”, and “3”. -The integer 4 has 5 names “1+1+1+1”, “2+1+1”, “2+2”, “3+1”, “4”. -The integer 5 has 7 names “1+1+1+1+1”, “2+1+1+1”, “2+2+1”, “3+1+1”, “3+2”, “4+1”, “5”. + This can be visualized in the following form:
           1
@@ -25,12 +27,11 @@ This can be visualized in the following form:
 
Where row $n$ corresponds to integer $n$, and each column $C$ in row $m$ from left to right corresponds to the number of names beginning with $C$. Optionally note that the sum of the $n$-th row $P(n)$ is the integer partition function. -Implement a function that returns the sum of the $n$-th row.
## Instructions
- +Implement a function that returns the sum of the $n$-th row.
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abc-problem.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abc-problem.english.md index db21cf542d..1dfe0c2902 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abc-problem.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abc-problem.english.md @@ -29,15 +29,16 @@ You are given a collection of ABC blocks (e.g., childhood alphabet blocks). Ther (P C) (Z M) -Some rules to keep in mind: -Once a letter on a block is used, that block cannot be used again. -The function should be case-insensitive. -Implement a function that takes a string (word) and determines whether the word can be spelled with the given collection of blocks. ## Instructions
- +Implement a function that takes a string (word) and determines whether the word can be spelled with the given collection of blocks. +Some rules to keep in mind: +
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abundant-deficient-and-perfect-number-classifications.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abundant-deficient-and-perfect-number-classifications.english.md index 60a0ab9940..2d61f4e1ac 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abundant-deficient-and-perfect-number-classifications.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/abundant-deficient-and-perfect-number-classifications.english.md @@ -6,7 +6,7 @@ challengeType: 5 ## Description
-These define three classifications of positive integers based on their proper divisors. +These define three classifications of positive integers based on their proper divisors. Let $P(n)$ be the sum of the proper divisors of n where proper divisors are all positive integers n other than n itself.
 If  P(n) < n  then n is classed as deficient
@@ -16,12 +16,11 @@ If  P(n) > n  then n is clas
 Example:
 6 has proper divisors of 1, 2, and 3.
 1 + 2 + 3 = 6, so 6 is classed as a perfect number.
-Implement a function that calculates how many of the integers from 1 to 20,000 (inclusive) are in each of the three classes. Output the result as an array in the following format [deficient, perfect, abundant].
 
## Instructions
- +Implement a function that calculates how many of the integers from 1 to 20,000 (inclusive) are in each of the three classes. Output the result as an array in the following format [deficient, perfect, abundant].
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/accumulator-factory.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/accumulator-factory.english.md index 4634a46bbf..d50edbb9ef 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/accumulator-factory.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/accumulator-factory.english.md @@ -6,16 +6,16 @@ challengeType: 5 ## Description
-Create a function that takes a single (numeric) argument and returns another function that is an accumulator. The returned accumulator function in turn also takes a single numeric argument, and returns the sum of all the numeric values passed in so far to that accumulator (including the initial value passed when the accumulator was created). -Rules: -Do not use global variables. -Hint: -Closures save outer state. +A problem posed by Paul Graham is that of creating a function that takes a single (numeric) argument and which returns another function that is an accumulator. The returned accumulator function in turn also takes a single numeric argument, and returns the sum of all the numeric values passed in so far to that accumulator (including the initial value passed when the accumulator was created).
## Instructions
- +Create a function that takes a number $n$ and generates accumulator functions that return the sum of every number ever passed to them. +Rules: +Do not use global variables. +Hint: +Closures save outer state.
## Tests @@ -71,7 +71,7 @@ if (testFn) { ```js function accumulator(sum) { - return function (n) { + return function(n) { return sum += n; }; } diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/ackermann-function.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/ackermann-function.english.md index 04c14fef34..0e1b86497b 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/ackermann-function.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/ackermann-function.english.md @@ -9,12 +9,12 @@ challengeType: 5 The Ackermann function is a classic example of a recursive function, notable especially because it is not a primitive recursive function. It grows very quickly in value, as does the size of its call tree. The Ackermann function is usually defined as follows: $A(m, n) = \begin{cases} n+1 & \mbox{if } m = 0 \\ A(m-1, 1) & \mbox{if } m > 0 \mbox{ and } n = 0 \\ A(m-1, A(m, n-1)) & \mbox{if } m > 0 \mbox{ and } n > 0. \end{cases}$ -Its arguments are never negative and it always terminates. Write a function which returns the value of $A(m, n)$. Arbitrary precision is preferred (since the function grows so quickly), but not required. +Its arguments are never negative and it always terminates. ## Instructions
- +Write a function which returns the value of $A(m, n)$. Arbitrary precision is preferred (since the function grows so quickly), but not required.
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/align-columns.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/align-columns.english.md index acc64e3f27..0fdcc89528 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/align-columns.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/align-columns.english.md @@ -7,6 +7,10 @@ challengeType: 5 ## Description
Given a text file of many lines, where fields within a line are delineated by a single $ character, write a program that aligns each column of fields by ensuring that words in each column are separated by at least one space. Further, allow for each word in a column to be either left justified, right justified, or center justified within its column. +
+ +## Instructions +
Use the following text to test your programs:
 Given$a$text$file$of$many$lines
@@ -22,20 +26,15 @@ or$center$justified$within$its$column.
 
Note that:
    -
  1. The example input texts lines may, or may not, have trailing dollar characters.
  2. -
  3. All columns should share the same alignment.
  4. -
  5. Consecutive space characters produced adjacent to the end of lines are insignificant for the purposes of the task.
  6. -
  7. Output text will be viewed in a mono-spaced font on a plain text editor or basic terminal.
  8. -
  9. The minimum space between columns should be computed from the text and not hard-coded.
  10. -
  11. It is not a requirement to add separating characters between or around columns.
  12. +
  13. The example input texts lines may, or may not, have trailing dollar characters.
  14. +
  15. All columns should share the same alignment.
  16. +
  17. Consecutive space characters produced adjacent to the end of lines are insignificant for the purposes of the task.
  18. +
  19. Output text will be viewed in a mono-spaced font on a plain text editor or basic terminal.
  20. +
  21. The minimum space between columns should be computed from the text and not hard-coded.
  22. +
  23. It is not a requirement to add separating characters between or around columns.
-## Instructions -
- -
- ## Tests
diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/amicable-pairs.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/amicable-pairs.english.md index da68859565..663c8eb25a 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/amicable-pairs.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/amicable-pairs.english.md @@ -6,19 +6,18 @@ challengeType: 5 ## Description
-Two integers $N$ and $M$ are said to be amicable pairs if $N \neq M$ and the sum of the proper divisors of $N$ ($\mathrm{sum}(\mathrm{propDivs}(N))$) $= M$ as well as $\mathrm{sum}(\mathrm{propDivs}(M)) = N$. +Two integers $N$ and $M$ are said to be amicable pairs if $N \neq M$ and the sum of the proper divisors of $N$ ($\mathrm{sum}(\mathrm{propDivs}(N))$) $= M$ as well as $\mathrm{sum}(\mathrm{propDivs}(M)) = N$. Example: 1184 and 1210 are an amicable pair, with proper divisors: -Calculate and show here the Amicable pairs below 20,000 (there are eight).
## Instructions
- +Calculate and show here the Amicable pairs below 20,000 (there are eight).
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-mode.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-mode.english.md index f099246a88..c68c451666 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-mode.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-mode.english.md @@ -6,7 +6,9 @@ challengeType: 5 ## Description
-

Write a program to find the mode value of a collection.

The case where the collection is empty may be ignored. Care must be taken to handle the case where the mode is non-unique.

If it is not appropriate or possible to support a general collection, use a vector (array), if possible. If it is not appropriate or possible to support an unspecified value type, use integers.

+Write a program to find the mode value of a collection. +The case where the collection is empty may be ignored. Care must be taken to handle the case where the mode is non-unique. +If it is not appropriate or possible to support a general collection, use a vector (array), if possible. If it is not appropriate or possible to support an unspecified value type, use integers.
## Instructions diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-pythagorean-means.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-pythagorean-means.english.md index 5d4476f760..46b1c04eaa 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-pythagorean-means.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-pythagorean-means.english.md @@ -9,16 +9,20 @@ challengeType: 5 Compute all three of the Pythagorean means of the set of integers 1 through 10 (inclusive). Show that $A(x_1,\ldots,x_n) \geq G(x_1,\ldots,x_n) \geq H(x_1,\ldots,x_n)$ for this set of positive integers. -Assume the input is an ordered array of all inclusive numbers. +
+ +## Instructions +
+When writing your function, assume the input is an ordered array of all inclusive numbers. For the answer, please output an object in the following format: -
+
 {
   values: {
     Arithmetic: 5.5,
@@ -30,11 +34,6 @@ For the answer, please output an object in the following format:
 
-## Instructions -
- -
- ## Tests
diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-root-mean-square.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-root-mean-square.english.md index 29ffe09cac..77c9045b35 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-root-mean-square.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/averages-root-mean-square.english.md @@ -6,7 +6,7 @@ challengeType: 5 ## Description
-Compute the Root mean square of the numbers 1 through 10 inclusive. +Compute the Root mean square of the numbers 1 through 10 inclusive. The root mean square is also known by its initials RMS (or rms), and as the quadratic mean. The RMS is calculated as the mean of the squares of the numbers, square-rooted: $$x_{\mathrm{rms}} = \sqrt {{{x_1}^2 + {x_2}^2 + \cdots + {x_n}^2} \over n}. $$ diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/babbage-problem.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/babbage-problem.english.md index abfa7e02d5..46fd4807c1 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/babbage-problem.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/babbage-problem.english.md @@ -6,19 +6,18 @@ challengeType: 5 ## Description
-Charles Babbage, looking ahead to the sorts of problems his Analytical Engine would be able to solve, gave this example: +Charles Babbage, looking ahead to the sorts of problems his Analytical Engine would be able to solve, gave this example:
What is the smallest positive integer whose square ends in the digits 269,696?
Babbage, letter to Lord Bowden, 1837; see Hollingdale and Tootill, Electronic Computers, second edition, 1970, p. 125.
He thought the answer might be 99,736, whose square is 9,947,269,696; but he couldn't be certain. The task is to find out if Babbage had the right answer. -Implement a function to return the lowest integer that satisfies the Babbage problem. If Babbage was right, return Babbage's number.
## Instructions
- +Implement a function to return the lowest integer that satisfies the Babbage problem. If Babbage was right, return Babbage's number.
## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/balanced-brackets.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/balanced-brackets.english.md index d972c408aa..4d442f1b44 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/balanced-brackets.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/balanced-brackets.english.md @@ -7,16 +7,16 @@ challengeType: 5 ## Description
Determine whether a generated string of brackets is balanced; that is, whether it consists entirely of pairs of opening/closing brackets (in that order), none of which mis-nest. -Examples: -
-(empty) true
-[] true
-][ false
-[][] true
-][][ false
-[]][[] false
-[[[[]]]] true
-
+

Examples:

+ +| Input | Output | +| --- | --- | +| [] | true | +| ][ | false | +| [][] | true | +| ][][ | false | +| []][[] | false | +| [[[[]]]] | true |
## Instructions diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/circles-of-given-radius-through-two-points.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/circles-of-given-radius-through-two-points.english.md index 08282e29cc..57d5175d7d 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/circles-of-given-radius-through-two-points.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/circles-of-given-radius-through-two-points.english.md @@ -14,7 +14,10 @@ Given two points on a plane and a radius, usually two circles of given radius ca
  • If the points form a diameter then return a single circle.
  • If the points are too far apart then no circles can be drawn.
  • -Task: +
    + +## Instructions +
    Implement a function that takes two points and a radius and returns the two circles through those points. For each resulting circle, provide the coordinates for the center of each circle rounded to four decimal digits. Return each coordinate as an array, and coordinates as an array of arrays. For edge cases, return the following:
    -## Instructions -
    - -
    - ## Tests
    diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/comma-quibbling.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/comma-quibbling.english.md index f6447c2c16..8486878768 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/comma-quibbling.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/comma-quibbling.english.md @@ -6,7 +6,11 @@ challengeType: 5 ## Description
    -Comma quibbling is a task originally set by Eric Lippert in his blog. +Comma quibbling is a task originally set by Eric Lippert in his blog. +
    + +## Instructions +
    Write a function to generate a string output which is the concatenation of input words from a list/sequence where:
    1. An input of no words produces the output string of just the two brace characters "{}".
    2. @@ -24,11 +28,6 @@ Test your function with the following series of inputs showing your output here Note: Assume words are non-empty strings of uppercase characters for this task.
    -## Instructions -
    - -
    - ## Tests
    diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/compare-a-list-of-strings.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/compare-a-list-of-strings.english.md index c62b2df0eb..9beb48d504 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/compare-a-list-of-strings.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/compare-a-list-of-strings.english.md @@ -6,7 +6,7 @@ challengeType: 5 ## Description
    -Given a list of arbitrarily many strings, implement a function for each of the following conditions: +Given a list of arbitrarily many strings, implement a function for each of the following conditions:
    • test if they are all lexically equal
    • test if every string is lexically less than the one after it (i.e. whether the list is in strict ascending order)
    • diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/convert-seconds-to-compound-duration.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/convert-seconds-to-compound-duration.english.md index 3adf1a2630..884989ae4b 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/convert-seconds-to-compound-duration.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/convert-seconds-to-compound-duration.english.md @@ -13,64 +13,24 @@ Implement a function which:
    Demonstrate that it passes the following three test-cases:
    Test Cases
    - - - - - - - - - - - - - - - - - - - -
    input numberoutput number
    72592 hr, 59 sec
    864001 d
    60000009 wk, 6 d, 10 hr, 40 min
    + +| Input number | Output number | +| --- | --- | +| 7259 | 2 hr, 59 sec | +| 728640059 | 1 d | +| 6000000 | 9 wk, 6 d, 10 hr, 40 min |
    Details
    • The following five units should be used: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      unitsuffix used in outputconversion
      weekwk1 week = 7 days
      dayd1 day = 24 hours
      hourhr1 hour = 60 minutes
      minutemin1 minute = 60 seconds
      secondsec
      + +| Unit | Suffix used in Output | Conversion | +| --- | --- | --- | +| week | wk | 1 week = 7 days | +| day | d | 1 day = 24 hours | +| hour | hr | 1 hour = 60 minutes | +| minute | min | 1 minute = 60 seconds | +| second | sec | --- |
    • However, only include quantities with non-zero values in the output (e.g., return 1 d and not 0 wk, 1 d, 0 hr, 0 min, 0 sec). diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/count-the-coins.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/count-the-coins.english.md index 51e439a6c1..e9f1cca488 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/count-the-coins.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/count-the-coins.english.md @@ -22,16 +22,15 @@ There are four types of common coins in an algorithm from MIT Press.
    • -
    ## Instructions
    - +Implement a function to determine how many ways there are to make change for a dollar using these common coins (1 dollar = 100 cents) +Reference: +
    ## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cramers-rule.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cramers-rule.english.md index fd48b11ae3..7aec360d05 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cramers-rule.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cramers-rule.english.md @@ -19,7 +19,10 @@ Then the values of $x, y$ and $z$ can be found as follows: $x = \frac{\begin{vmatrix} {\color{red}d_1} & b_1 & c_1 \\ {\color{red}d_2} & b_2 & c_2 \\ {\color{red}d_3} & b_3 & c_3 \end{vmatrix} } { \begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix}}, \quad y = \frac {\begin{vmatrix} a_1 & {\color{red}d_1} & c_1 \\ a_2 & {\color{red}d_2} & c_2 \\ a_3 & {\color{red}d_3} & c_3 \end{vmatrix}} {\begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix}}, \text{ and }z = \frac { \begin{vmatrix} a_1 & b_1 & {\color{red}d_1} \\ a_2 & b_2 & {\color{red}d_2} \\ a_3 & b_3 & {\color{red}d_3} \end{vmatrix}} {\begin{vmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{vmatrix} }.$ -Task +
    + +## Instructions +
    Given the following system of equations: $\begin{cases} @@ -32,11 +35,6 @@ Given the following system of equations: solve for $w$, $x$, $y$ and $z$, using Cramer's rule.
    -## Instructions -
    - -
    - ## Tests
    diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cusip.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cusip.md index 2b57fa64fd..d90a3205c3 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cusip.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cusip.md @@ -7,12 +7,11 @@ challengeType: 5 ## Description
    A CUSIP is a nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades. The CUSIP was adopted as an American National Standard under Accredited Standards X9.6. -Write a function that takes a string as a parameter and checks if the string is valid CUSIP.
    ## Instructions
    - +Write a function that takes a string as a parameter and checks if the string is valid CUSIP.
    ## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cut-a-rectangle.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cut-a-rectangle.md index 26090096e0..99b842bc58 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cut-a-rectangle.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/cut-a-rectangle.md @@ -12,12 +12,11 @@ A given rectangle is made from m × n squares. If m and Picture of cut rectangles -Write a function that calculates the number of different ways to cut an m × n rectangle.
    ## Instructions
    - +Write a function that calculates the number of different ways to cut an m × n rectangle.
    ## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/day-of-the-week.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/day-of-the-week.english.md index e335a9a4f5..966aba6d94 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/day-of-the-week.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/day-of-the-week.english.md @@ -7,12 +7,11 @@ challengeType: 5 ## Description
    A company decides that whenever Xmas falls on a Sunday they will give their workers all extra paid holidays so that, together with any public holidays, workers will not have to work the following week (between the 25th of December and the first of January). -Write a function that takes a start year and an end year and return an array of all the years where the 25th of December will be a Sunday.
    ## Instructions
    - +Write a function that takes a start year and an end year and return an array of all the years where the 25th of December will be a Sunday.
    ## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/deal-cards-for-freecell.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/deal-cards-for-freecell.english.md index 3e3e863ede..8173840e3f 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/deal-cards-for-freecell.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/deal-cards-for-freecell.english.md @@ -56,13 +56,12 @@ The algorithm follows: ['4S', 'TS', '2H', '5D', 'JC', '6C', 'JH', 'QH'], ['JD', 'KS', 'KC', '4H'] ] -Write a function to take a deal number and deal cards in the same order as this algorithm. The function must return a two dimensional array representing the FreeCell board. -Deals can also be checked against FreeCell solutions to 1000000 games. (Summon a video solution, and it displays the initial deal.)
    ## Instructions
    - +Write a function to take a deal number and deal cards in the same order as this algorithm. The function must return a two dimensional array representing the FreeCell board. +Deals can also be checked against FreeCell solutions to 1000000 games. (Summon a video solution, and it displays the initial deal.)
    ## Tests diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/department-numbers.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/department-numbers.english.md index 68c95af109..81f8f446c0 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/department-numbers.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/department-numbers.english.md @@ -6,32 +6,34 @@ challengeType: 5 ## Description
    -

    There is a highly organized city that has decided to assign a number to each of their departments:

    -Police department -Sanitation department -Fire department -

    Each department can have a number between 1 and 7 (inclusive).

    The three department numbers are to be unique (different from each other) and must add up to the number 12.

    The Chief of the Police doesn't like odd numbers and wants to have an even number for his department.

    -Task: -

    Write a program which outputs all valid combinations:

    -

    [2, 3, 7]

    -

    [2, 4, 6]

    -

    [2, 6, 4]

    -

    [2, 7, 3]

    -

    [4, 1, 7]

    -

    [4, 2, 6]

    -

    [4, 3, 5]

    -

    [4, 5, 3]

    -

    [4, 6, 2]

    -

    [4, 7, 1]

    -

    [6, 1, 5]

    -

    [6, 2, 4]

    -

    [6, 4, 2]

    -

    [6, 5, 1]

    +There is a highly organized city that has decided to assign a number to each of their departments: +
      +
    • Police department
    • +
    • Sanitation department
    • +
    • Fire department
    • +
    +Each department can have a number between 1 and 7 (inclusive). +The three department numbers are to be unique (different from each other) and must add up to the number 12. +The Chief of the Police doesn't like odd numbers and wants to have an even number for his department.
    ## Instructions
    - +Write a program which outputs all valid combinations: +[2, 3, 7] +[2, 4, 6] +[2, 6, 4] +[2, 7, 3] +[4, 1, 7] +[4, 2, 6] +[4, 3, 5] +[4, 5, 3] +[4, 6, 2] +[4, 7, 1] +[6, 1, 5] +[6, 2, 4] +[6, 4, 2] +[6, 5, 1]
    ## Tests