C++ Super Simple and Easy Concise 6-lines O(n+m) Solution
\nclass Solution {\npublic:\n    bool searchMatrix(vector<vector<int>>& matrix, int target) {\n        int row = 0, col = matrix[0].size()-1;\n        \n       
```\nclass Solution {\npublic:\n    bool searchMatrix(vector<vector<int>>& matrix, int target) {\n        int row = 0, col = matrix[0].size()-1;\n        \n        while (row < matrix.size() && col >= 0) {\n            \n            if (target == matrix[row][col])\n                return true;\n            \n            target > matrix[row][col] ? row++ : col--;\n        }\n        \n        return false;\n    }\n};\n```\n**Like it? please upvote...**
['C']