Recursion Solution , Pick and NotPick Accepted
\n   public int maximumRows(int[][] mat, int cols) {\n\n        return helper(0, cols, mat);\n    }\n\n    Set<Integer> set = new HashSet<>();\n\n    int helper
```\n   public int maximumRows(int[][] mat, int cols) {\n\n        return helper(0, cols, mat);\n    }\n\n    Set<Integer> set = new HashSet<>();\n\n    int helper(int col, int cols, int[][] mat) {\n        if (cols == 0 || col == mat[0].length) {\n            int res = count(mat);\n            return res;\n        }\n        set.add(col);\n        int pick = helper(col + 1, cols-1, mat);\n        set.remove(col);\n        int notPick = helper(col + 1, cols, mat);\n        return Math.max(pick, notPick);\n    }\n\n    int count(int[][] mat) {\n        int m = mat.length;\n        int n = mat[0].length;\n        int res = 0;\n        for (int i = 0; i < m; i++) {\n            int ones = 0;\n            for (int j = 0; j < n; j++) {\n                if (mat[i][j] == 1 && !set.contains(j))\n                    ones++;\n            }\n            if (ones == 0)\n                res++;\n        }\n        return res;\n    }\n\t```
['Recursion', 'Java']