exercism/website-copy

Python Track - Incomplete Test in Saddle-Points

bgvladedivac opened this issue · 1 comments

The first test returns the row and column { 1, 0 } for number 5, while { 2, 2 } = 7 also covers the definition for Saddle-Point.

It's called a "saddle point" because it is greater than or equal to every element in its row and less than or equal to every element in its column. Your code should be able to provide the (possibly empty) list of all the saddle points for any given matrix.

Row elements = [6, 6]
Column elements = [7, 2]

 def test_can_identify_single_saddle_point(self):
       matrix = [[9, 8, 7], [5, 3, 2], [6, 6, 7]]
       self.assertEqual(
           sorted_points(saddle_points(matrix)),
           sorted_points([{"row": 2, "column": 1}]),
       )

Sorry guys, my mistake :) 7 actuall does not cover the column part.