(self, matrix, target)
| 98 | return False |
| 99 | |
| 100 | def searchMatrix(self, matrix, target): |
| 101 | |
| 102 | if not any(matrix): |
| 103 | return False |
| 104 | |
| 105 | # column + row - |
| 106 | column, row = 0, len(matrix) - 1 |
| 107 | column_length = len(matrix[0]) |
| 108 | |
| 109 | while row >= 0 and column < column_length: |
| 110 | |
| 111 | if matrix[row][column] == target: |
| 112 | return True |
| 113 | |
| 114 | if matrix[row][column] > target: |
| 115 | row -= 1 |
| 116 | else: |
| 117 | column += 1 |
| 118 | |
| 119 | return False |
| 120 | |
| 121 | # def searchMatrix(self, matrix, target): |
| 122 | # """ |
nothing calls this directly
no outgoing calls
no test coverage detected