Search left column first. Find the last position of target such that A[y] <= target. Then binary search that row.
You can't do binary search on this question. Start from the upper right or lower left corner. Eliminate column or row depending on the comparison.
Last updated 6 years ago