Skip to content

saddle-points: Apply new "input" policy #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2018
Merged
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
58 changes: 34 additions & 24 deletions exercises/saddle-points/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exercise": "saddle-points",
"version": "1.0.0",
"version": "1.1.0",
"comments": [
"Matrix rows and columns are 0-indexed."
],
Expand All @@ -11,11 +11,13 @@
"This is the README example."
],
"property": "saddlePoints",
"input": [
[9, 8, 7],
[5, 3, 2],
[6, 6, 7]
],
"input": {
"matrix": [
[9, 8, 7],
[5, 3, 2],
[6, 6, 7]
]
},
"expected": [
{
"row": 1,
Expand All @@ -26,29 +28,35 @@
{
"description": "Can identify that empty matrix has no saddle points",
"property": "saddlePoints",
"input": [
[]
],
"input": {
"matrix": [
[]
]
},
"expected": []
},
{
"description": "Can identify lack of saddle points when there are none",
"property": "saddlePoints",
"input": [
[1, 2, 3],
[3, 1, 2],
[2, 3, 1]
],
"input": {
"matrix": [
[1, 2, 3],
[3, 1, 2],
[2, 3, 1]
]
},
"expected": []
},
{
"description": "Can identify multiple saddle points",
"property": "saddlePoints",
"input": [
[4, 5, 4],
[3, 5, 5],
[1, 5, 4]
],
"input": {
"matrix": [
[4, 5, 4],
[3, 5, 5],
[1, 5, 4]
]
},
"expected": [
{
"row": 0,
Expand All @@ -71,11 +79,13 @@
"off-by-one errors."
],
"property": "saddlePoints",
"input": [
[8, 7, 9],
[6, 7, 6],
[3, 2, 5]
],
"input": {
"matrix": [
[8, 7, 9],
[6, 7, 6],
[3, 2, 5]
]
},
"expected": [
{
"row": 2,
Expand Down