100% faster ,Brute force C++,Easy to Understand
Simply check for all the combinations of columns i.e, check for a set of coulms taken that how many rows are covered tht can be furthur checked by checking all 
**Simply check for all the combinations of columns i.e, check for a set of coulms taken that how many rows are covered tht can be furthur checked by checking all the ones in a row are present in the selected columns or not if yes count++ and at last take the maximum of this count for all the combinations of coulmns generated.**\n*Just use a function to generate all the combinations of columns and then check the ones in a row for all these combinations generated .\nlook the code for more understanding*\n* And one thing also since the contraints are not big so we will not get tle for using brute force.\n```\n void solve(vector<vector<int>>&mat,vector<int>temp,int i,int j,int cols){\n        if(i==j){\n            if(temp.size()==cols)mat.push_back(temp);return;\n        }\n        solve(mat,temp,i+1,j,cols);\n        temp.push_back(i);\n        solve(mat,temp,i+1,j,cols);\n        temp.pop_back();\n    }\n    \n    int maximumRows(vector<vector<int>>& mat, int cols) {\n        int r=mat.size(),c=mat[0].size();\n        if(cols>=c){\n            return r;\n        }\n    vector<vector<int>>tot;\n        vector<int>temp;\n        solve(tot,temp,0,c,cols);\n        \n\n    int ans=0;\n  \n       \n      for(auto x: tot){\n          map<int,int>mp;\n          for(auto it:x)mp[it]++;\n          int res=0;\n           for(int i=0;i<r;i++){\n              \n             bool ok=true;\n                 for(int j=0;j<c;j++){\n                    \n                    if(mat[i][j]==1 and mp.find(j)==mp.end())ok=false;\n                 }\n             \n             if(ok)res++;\n                \n            }\n          ans=max(res,ans);\n      }\n        \n        \n\n       \n    return ans;\n    }\n```
['Backtracking', 'C']