C++ || easy to understand
\nbool searchMatrix(vector<vector<int>>& matrix, int target) {\n\t\tint R = matrix.size();         //number of rows.\n        int C = matrix[0].size();     //nu
```\nbool searchMatrix(vector<vector<int>>& matrix, int target) {\n\t\tint R = matrix.size();         //number of rows.\n        int C = matrix[0].size();     //number of columns.\n        int i = 0 , j = C - 1;           //choosing iterator i & j to search the target.\n        while(i < R && j >= 0)\n        {\n            if(matrix[i][j] == target)   //if we find the target we return true.\n                return true;\n            else if(matrix[i][j] < target)     //if the value at position i & j is smaller than target then we move downward to next column. \n                i ++;\n            else                   // else if value at i & j is greater than target then we go leftward in same row.\n                j --;\n        }\n        return false;       // if the target element is not present in the matrix then return false.\n    }\n```\nif you find this helpful upvote please.
['Two Pointers', 'C']