diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/soundex.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/soundex.md
index 58ca7e3147..d16a8a7d32 100644
--- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/soundex.md
+++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/soundex.md
@@ -7,16 +7,17 @@ challengeType: 5
## Description
-Write a function that takes a string as a parameter and returns the encoded string.
+The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling (from the WP article).
+There is a major issue in many of the implementations concerning the separation of two consonants that have the same soundex code! According to the official Rules https://www.archives.gov/research/census/soundex.html. So check for instance if Ashcraft is coded to A-261.
+
+
spiralArray
should be a function.
testString: assert(typeof spiralArray=='function','spiralArray
should be a function.');
- - text: spiralArray(3)
should return a array.
- testString: assert(Array.isArray(spiralArray(3)), 'spiralArray(3)
should return a array.');
+ - text: spiralArray(3)
should return an array.
+ testString: assert(Array.isArray(spiralArray(3)), 'spiralArray(3)
should return an array.');
- text: spiralArray(3)
should return [[0, 1, 2],[7, 8, 3],[6, 5, 4]]
.
testString: assert.deepEqual(spiralArray(3), [[0, 1, 2], [7, 8, 3], [6, 5, 4]], 'spiralArray(3)
should return [[0, 1, 2],[7, 8, 3],[6, 5, 4]]
.');
- text: spiralArray(4)
should return [[0, 1, 2, 3],[11, 12, 13, 4],[10, 15, 14, 5],[9, 8, 7, 6]]
.
@@ -47,7 +47,7 @@ tests:
"gHHH5YY++///\" +should be split as: -["g", "HHH", "5", "YY", "++", "///", "\" ] +
+["g", "HHH", "5", "YY", "++", "///", "\" ]; +
split
should be a function.
testString: assert(typeof split == 'function', 'split
should be a function.');
- - text: split("hello")
should return a array.
- testString: assert(Array.isArray(split("hello")), 'split("hello")
should return a array.');
+ - text: split("hello")
should return an array.
+ testString: assert(Array.isArray(split("hello")), 'split("hello")
should return an array.');
- text: split("hello")
should return ["h", "e", "ll", "o"]
.
testString: assert.deepEqual(split("hello"), ["h", "e", "ll", "o"], 'split("hello")
should return ["h", "e", "ll", "o"]
.');
- text: split("commission")
should return ["c", "o", "mm", "i", "ss", "i", "o", "n"]
.
@@ -47,7 +51,7 @@ tests:
{"from":[],"to":[]}
. The "from" array should contain the original names and the "to" array should contain the resultant names.
solve
should be a function.
testString: assert(typeof solve == 'function', 'solve
should be a function.');
- - text: solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])
should return a array.
- testString: assert(Array.isArray(solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])), 'solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])
should return a array.');
+ - text: solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])
should return an array.
+ testString: assert(Array.isArray(solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])), 'solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])
should return an array.');
- text: 'solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])
should return [{ from: ["North Carolina ", "South Dakota"], to: ["North Dakota", "South Carolina"] }]
.'
testString: assert.deepEqual(solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"]), [{ from:["North Carolina ", "South Dakota"], to:["North Dakota", "South Carolina"] }], 'solve(["New Mexico", "New York", "North Carolina ", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota"])
should return [{ from:["North Carolina ", "South Dakota"], to:["North Dakota", "South Carolina"] }]
.');
- text: 'solve(["New York", "New Kory", "Wen Kory", "York New", "Kory New", "New Kory"])
should return [{ from: ["New Kory", "New York"], to: ["Wen Kory", "York New"] }, { from: ["New Kory", "New York"], to: ["Kory New", "Wen Kory"] }, { from: ["New Kory", "New York"], to: ["Kory New", "York New"] }, { from: ["New York", "Wen Kory"], to: ["New Kory", "York New"] }, { from: ["New York", "Wen Kory"], to: ["Kory New", "New Kory"] }, { from: ["New York", "Wen Kory"], to: ["Kory New", "York New"] }, { from: ["New York", "York New"], to: ["New Kory", "Wen Kory"] }, { from: ["New York", "York New"], to: ["Kory New", "New Kory"] }, { from: ["New York", "York New"], to: ["Kory New", "Wen Kory"] }, { from: ["Kory New", "New York"], to: ["New Kory", "Wen Kory"] }, { from: ["Kory New", "New York"], to: ["New Kory", "York New"] }, { from: ["Kory New", "New York"], to: ["Wen Kory", "York New"] }, { from: ["New Kory", "Wen Kory"], to: ["Kory New", "York New"] }, { from: ["New Kory", "York New"], to: ["Kory New", "Wen Kory"] }, { from: ["Kory New", "New Kory"], to: ["Wen Kory", "York New"] }]
.'
@@ -43,7 +40,7 @@ tests: