C++ || backtracking || intuitive approach || 4 ms
Try all possible combination of columns \n* Check against each combination of columns for the maximum covered rows\n\n\nclass Solution {\npublic:\n    int solve
* Try all possible combination of columns \n* Check against each combination of columns for the maximum covered rows\n\n```\nclass Solution {\npublic:\n    int solve(vector<vector<int>> &mat, int curCol , int column, vector<int> &selectedColumn){\n        \n        if(column == 0){\n            int count = 0;\n            int selectedRows = mat.size();\n            for(int i =0; i< mat.size(); i++){\n                for(int j = 0; j < mat[0].size();j++){\n                    if(selectedColumn[j]) continue;\n                    if(mat[i][j] == 1){\n                        selectedRows--;\n                       break; \n                    }\n                    \n                }\n            }\n            return selectedRows;\n        }\n        if(curCol >= mat[0].size()) return 0;\n        selectedColumn[curCol] =1;\n        int pick = solve(mat, curCol+1, column-1, selectedColumn);\n            \n        selectedColumn[curCol] =0;\n        int notPick = solve(mat, curCol+1, column, selectedColumn);\n        return max(pick, notPick);\n    }\n    int maximumRows(vector<vector<int>>& mat, int cols) {\n        vector<int> selectedColumn(mat[0].size());\n        return solve(mat, 0, cols, selectedColumn);\n    }\n};\n```
['Backtracking', 'C']