Skip to content

Commit

Permalink
Merge pull request #1387 from exercism/smann/matrix-notation
Browse files Browse the repository at this point in the history
matrix: Switch to canonical notation of matrix indices
  • Loading branch information
rpottsoh authored Dec 24, 2018
2 parents d9b62c9 + e380856 commit 155566f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions exercises/matrix/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"exercise": "matrix",
"version": "1.0.0",
"version": "1.1.0",
"cases": [
{
"description": "extract row from one number matrix",
"property": "row",
"input": {
"string": "1",
"index": 0
"index": 1
},
"expected": [1]
},
Expand All @@ -16,7 +16,7 @@
"property": "row",
"input": {
"string": "1 2\n3 4",
"index": 1
"index": 2
},
"expected": [3, 4]
},
Expand All @@ -25,7 +25,7 @@
"property": "row",
"input": {
"string": "1 2\n10 20",
"index": 1
"index": 2
},
"expected": [10, 20]
},
Expand All @@ -34,7 +34,7 @@
"property": "row",
"input": {
"string": "1 2 3\n4 5 6\n7 8 9\n8 7 6",
"index": 2
"index": 3
},
"expected": [7, 8, 9]
},
Expand All @@ -43,7 +43,7 @@
"property": "column",
"input": {
"string": "1",
"index": 0
"index": 1
},
"expected": [1]
},
Expand All @@ -52,7 +52,7 @@
"property": "column",
"input": {
"string": "1 2 3\n4 5 6\n7 8 9",
"index": 2
"index": 3
},
"expected": [3, 6, 9]
},
Expand All @@ -61,7 +61,7 @@
"property": "column",
"input": {
"string": "1 2 3\n4 5 6\n7 8 9\n8 7 6",
"index": 2
"index": 3
},
"expected": [3, 6, 9, 6]
},
Expand All @@ -70,7 +70,7 @@
"property": "column",
"input": {
"string": "89 1903 3\n18 3 1\n9 4 800",
"index": 1
"index": 2
},
"expected": [1903, 3, 4]
}
Expand Down
8 changes: 4 additions & 4 deletions exercises/matrix/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ So given a string with embedded newlines like:
representing this matrix:

```text
0 1 2
1 2 3
|---------
0 | 9 8 7
1 | 5 3 2
2 | 6 6 7
1 | 9 8 7
2 | 5 3 2
3 | 6 6 7
```

your code should be able to spit out:
Expand Down

0 comments on commit 155566f

Please sign in to comment.