Sha256: cc86becb7aadf4cb338e6185c1bf3d83d52744a656f5e15bc40397d755560250

Contents?: true

Size: 1.68 KB

Versions: 148

Compression:

Stored size: 1.68 KB

Contents

{
  "exercise": "saddle-points",
  "version": "1.0.0",
  "comments": [
    "Matrix rows and columns are 0-indexed."
  ],
  "cases": [
    {
      "description": "Can identify single saddle point",
      "comments": [
        "This is the README example."
      ],
      "property": "saddlePoints",
      "input": [
        [9, 8, 7],
        [5, 3, 2],
        [6, 6, 7]
      ],
      "expected": [
        {
          "row": 1,
          "column": 0
        }
      ]
    },
    {
      "description": "Can identify that empty matrix has no saddle points",
      "property": "saddlePoints",
      "input": [
        []
      ],
      "expected": []
    },
    {
      "description": "Can identify lack of saddle points when there are none",
      "property": "saddlePoints",
      "input": [
        [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]
      ],
      "expected": [
        {
          "row": 0,
          "column": 1
        },
        {
          "row": 1,
          "column": 1
        },
        {
          "row": 2,
          "column": 1
        }
      ]
    },
    {
      "description": "Can identify saddle point in bottom right corner",
      "comments": [
        "This is a permutation of the README matrix designed to test",
        "off-by-one errors."
      ],
      "property": "saddlePoints",
      "input": [
        [8, 7, 9],
        [6, 7, 6],
        [3, 2, 5]
      ],
      "expected": [
        {
          "row": 2,
          "column": 2
        }
      ]
    }
  ]
}

Version data entries

148 entries across 148 versions & 1 rubygems

Version Path
trackler-2.1.0.13 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.12 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.11 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.10 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.9 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.8 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.7 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.6 common/exercises/saddle-points/canonical-data.json