Solution: Search a 2D Matrix
Let's solve the Search a 2D Matrix problem using the Modified Binary Search pattern.
We'll cover the following...
We'll cover the following...
Statement
Given a two dimensional integer array matrix with m rows and n columns, determine whether the integer target exists in matrix. Return true if target is present, otherwise return false.
The array matrix is sorted such that each row is in nondecreasing order, and the first element of each row is greater than the last element of the previous row.
Constraints: