Search in a sorted 2D matrix

problem [https://leetcode.com/problems/search-a-2d-matrix/ 74. Search a 2D Matrix].

Problem description
Write an efficient algorithm that searches for a value in an  matrix. This matrix has the following properties:
 * Integers in each row are sorted from left to right.
 * The first integer of each row is greater than the last integer of the previous row.


 * Example 1
 * Input:
 * Output:


 * Example 2
 * Input:
 * Output:


 * Constraints