From 081284c2d3607412506954f9c5eaff6f57c71afd Mon Sep 17 00:00:00 2001 From: The Coding Aviator <34807532+thecodingaviator@users.noreply.github.com> Date: Tue, 5 Mar 2019 11:57:57 +0530 Subject: [PATCH] fix: Formatting for Zig Zag Matrix challenge (#35403) * fix: Formatting for Zig Zag Matrix challenge * Remove non-breaking spaces and replace them with normal spaces * Update zig-zag-matrix.english.md * Move instructions to instructions section from description * Update zig-zag-matrix.english.md --- .../rosetta-code/zig-zag-matrix.english.md | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zig-zag-matrix.english.md b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zig-zag-matrix.english.md index 55f5498142..55aa7fd8ba 100644 --- a/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zig-zag-matrix.english.md +++ b/curriculum/challenges/english/08-coding-interview-prep/rosetta-code/zig-zag-matrix.english.md @@ -6,11 +6,9 @@ challengeType: 5 ## Description
-A   ''zig-zag''   array is a square arrangement of the first   -$N^2$   integers,   where the -numbers increase sequentially as you zig-zag along the array's   -anti-diagonals. -For example, given   '''5''',   produce this array: +A 'zig-zag' array is a square arrangement of the first $N^2$ integers, where the numbers increase sequentially as you zig-zag along the array's anti-diagonals. + +For example, for the input 5, the following result should be produced:
  0  1  5  6 14
  2  4  7 13 15
@@ -18,13 +16,11 @@ For example, given   '''5''',   produce this array:
  9 11 17 20 22
 10 18 19 23 24
 
-Write a function that takes the size of the zig-zag matrix, and returns the -corresponding matrix as two-dimensional array.
## Instructions
- +Write a function that takes the size of the zig-zag matrix, and returns the corresponding matrix as two-dimensional array.
## Tests @@ -33,17 +29,17 @@ corresponding matrix as two-dimensional array. ```yml tests: - text: ZigZagMatrix must be a function - testString: assert.equal(typeof ZigZagMatrix, 'function', 'ZigZagMatrix must be a function'); + testString: assert.equal(typeof ZigZagMatrix, 'function'); - text: ZigZagMatrix should return array - testString: assert.equal(typeof ZigZagMatrix(1), 'object', 'ZigZagMatrix should return array'); - - text: ZigZagMatrix should return an array of nestes arrays - testString: assert.equal(typeof ZigZagMatrix(1)[0], 'object', 'ZigZagMatrix should return an array of nestes arrays'); + testString: assert.equal(typeof ZigZagMatrix(1), 'object'); + - text: ZigZagMatrix should return an array of nested arrays + testString: assert.equal(typeof ZigZagMatrix(1)[0], 'object'); - text: ZigZagMatrix(1) should return [[0]] - testString: assert.deepEqual(ZigZagMatrix(1), zm1, 'ZigZagMatrix(1) should return [[0]]'); + testString: assert.deepEqual(ZigZagMatrix(1), zm1); - text: ZigZagMatrix(2) should return [[0, 1], [2, 3]] - testString: assert.deepEqual(ZigZagMatrix(2), zm2, 'ZigZagMatrix(2) should return [[0, 1], [2, 3]]'); + testString: assert.deepEqual(ZigZagMatrix(2), zm2); - text: ZigZagMatrix(5) must return specified matrix - testString: assert.deepEqual(ZigZagMatrix(5), zm5, 'ZigZagMatrix(5) must return specified matrix'); + testString: assert.deepEqual(ZigZagMatrix(5), zm5); ```