Given an integer matrix matrix with m rows and n columns, determine whether the integer target exists in matrix.
The matrix has the following ordering properties:
Each row of matrix is sorted in ascending order from left to right.
Each column of matrix is sorted in ascending order from top to bottom.
Return true if target is present in matrix, otherwise return false.
Constraints:
m == matrix.length
n == matrix[i].length
All the integers in each row are sorted in ascending order.
All the integers in each column are sorted in ascending order.
Given an integer matrix matrix with m rows and n columns, determine whether the integer target exists in matrix.
The matrix has the following ordering properties:
Each row of matrix is sorted in ascending order from left to right.
Each column of matrix is sorted in ascending order from top to bottom.
Return true if target is present in matrix, otherwise return false.
Constraints:
m == matrix.length
n == matrix[i].length
All the integers in each row are sorted in ascending order.
All the integers in each column are sorted in ascending order.