Example 1

Example 2

m == matrix.lengthn == matrix[i].length1 <= n, m <= 300-109 <= matrix[i][j] <= 109All the integers in each row are sorted in ascending order.All the integers in each column are sorted in ascending order.-109 <= target <= 109Example 1

Example 2

m == matrix.lengthn == matrix[i].length1 <= n, m <= 300-109 <= matrix[i][j] <= 109All the integers in each row are sorted in ascending order.All the integers in each column are sorted in ascending order.-109 <= target <= 109