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.54 problem-specifications/exercises/saddle-points/canonical-data.json
trackler-2.1.0.53 problem-specifications/exercises/saddle-points/canonical-data.json
trackler-2.1.0.52 problem-specifications/exercises/saddle-points/canonical-data.json
trackler-2.1.0.51 problem-specifications/exercises/saddle-points/canonical-data.json
trackler-2.1.0.50 problem-specifications/exercises/saddle-points/canonical-data.json
trackler-2.1.0.49 problem-specifications/exercises/saddle-points/canonical-data.json
trackler-2.1.0.48 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.47 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.46 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.45 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.44 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.43 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.42 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.41 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.40 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.39 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.38 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.37 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.36 common/exercises/saddle-points/canonical-data.json
trackler-2.1.0.34 common/exercises/saddle-points/canonical-data.json