Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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