solve the search A 2D matrix problem.