Write an efficient algorithm that searches for a target value in an m x n integer matrix. Each row in the matrix is sorted in ascending order from left to right, and each column is sorted in ascending order from top to bottom.
Click Run to execute sample tests.