[PR] Saddle Points Instruction Update Request

The original instruction is confusing because it implies a row-first coordinate (row, col),

So the point at [2, 1] (row: 2, column: 1) is a great spot for a tree house.

but the expectation is a column-first coordinate, such as (col, row) or (X, Y) assuming X is on the horizontal axis.

For example, the first test case is almost the same example as in the instruction, and it returns (1, 2) = (Col, Row).

The current instruction text [2, 1] is not consistent with the test result (1, 2).

I also noticed other languages are using (row, col) format in the tests. Some languages also use 0-based rather than 1-based.

This makes me think this has to be done at a specific language track which is Prolog.

Tracks ought to be synced from the problem spec, unless there is a strong reason not to do so. Changes generally ought to go to the problem spec then synced to tracks. Changed generally ought to first be proposed, discussed and approved on the forum before PRs are created.

See also Suggesting Exercise Improvements | Exercism's Docs

The docs immediately point out which one is the row and which is the column so I think it’s cleared up fairly quickly. Going row, column intuitively tracks with how you’d access a multi-dimensional array since first you access the row you want and then you access the element at the column index you want.

This is not a general issue for other languages. I’m calling this is Prolog specific because other languages are consistent with the instruction going (row, column).

But, only for Prolog test cases, it decides to use (column, row).

Either

(1) the instruction for Prolog should be updated
(2) the test cases for Prolog should be updated.

It’s up to the Prolog maintainer, but updating the test cases would likely be the better action here since we’re discussing a track-specific implementation detail.

2 Likes

This would require maintainer input, but this is generally how it is done.

1 Like