✔️[C++] || 6 line Simple Code || Easy to understand || TC: O( n+m ) , SC: O( 1 )
Upvote if it helps\u2B06\uFE0F\n\n\tbool searchMatrix(vector<vector<int>>& matrix, int target) {\n        int n=matrix.size(), m=matrix[0].size();\n        int 
#### *Upvote if it helps\u2B06\uFE0F*\n```\n\tbool searchMatrix(vector<vector<int>>& matrix, int target) {\n        int n=matrix.size(), m=matrix[0].size();\n        int row=0,col=m-1;\n        while(row<n && col>=0){\n            if(matrix[row][col]==target) return 1;\n            else if(matrix[row][col]>target) col--;\n            else row++;\n        }\n        return 0;\n    }\n```
['C']