C++ simple solution 100% faster
C++ :\n\n\nbool searchMatrix(vector<vector<int>>& matrix, int target) {\n\tint row = 0;\n\tint col = matrix[0].size() - 1;\n\n\twhile(row < matrix.size() && col
**C++ :**\n\n```\nbool searchMatrix(vector<vector<int>>& matrix, int target) {\n\tint row = 0;\n\tint col = matrix[0].size() - 1;\n\n\twhile(row < matrix.size() && col >= 0)\n\t{\n\t\tif(matrix[row][col] == target)\n\t\t\treturn true;\n\n\t\tif(matrix[row][col] < target)\n\t\t\t++row;\n\n\t\telse\n\t\t\t--col;\n\n\t}\n\treturn false;\n}\n```\n\n**Like it ? please upvote !**
['C', 'C++']