Easy C++ Solution using Bitmask and Backtracking
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\nint ans=0;\nvoid helper(vector<vector<int>> &matrix,int k,int selectedcol,int index){\n    if(index>=matrix[0].size()){\n        if(k==0){\n            int t=0;\n            for(int i=0;i<matrix.size();i++){\n                bool cantake=true;\n                for(int j=0;j<matrix[0].size();j++){\n                    if(matrix[i][j]==1 and ((selectedcol>>j)&1)==0){\n                        cantake=false;\n                        break;\n                    }\n                }\n                if(cantake)t++;\n            }\n            ans=max(ans,t);\n        }\n        return;\n    }\n    helper(matrix,k,selectedcol,index+1);\n    selectedcol=(selectedcol | (1<<index));\n    helper(matrix,k-1,selectedcol,index+1);\n    selectedcol=(selectedcol & (~(1<<index)));\n}\n    int maximumRows(vector<vector<int>>& matrix, int numSelect) {\n        // vector<bool> selectedcol(matrix[0].size(),false); \n        int selectedcol=0;\n        helper(matrix,numSelect,selectedcol,0);\n        return ans;\n    }\n};\n```
['Backtracking', 'Bit Manipulation', 'Bitmask', 'C++']