Java backtrack
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```java []\nclass Solution {\n    public int maximumRows(int[][] matrix, int numSelect) {   \n        return max(matrix, numSelect, new ArrayList<>(), 0);\n    }\n\n    int max(int[][] matrix, int numSelect, List<Integer> current, int from) {\n        if (current.size() == numSelect) {\n            return countCovered(matrix, current);\n        }\n        int n = matrix[0].length;\n\n        var max = Integer.MIN_VALUE;\n        for (int j = from; j < n; j++) {\n            current.add(j);\n            max = Math.max(max, max(matrix, numSelect, current, j+1));\n            current.remove(current.size() - 1);\n        }\n        \n        return max;\n    }\n\n    int countCovered(int[][] matrix, List<Integer> current) {\n\n        int m = matrix.length;\n        int n = matrix[0].length;\n        int count = 0;\n        for (int i = 0; i <m; i++) {\n            var covered = checkCovered(matrix, i, current);\n            if (covered) {\n                count++;\n            }\n        }\n        return count;\n    }\n\n    boolean checkCovered(int[][] matrix, int row, List<Integer> selectedCols) {\n        int n = matrix[0].length;\n\n        for (int j = 0; j < n; j++) {\n            if (matrix[row][j] == 1 && !selectedCols.contains(j)) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n```
['Java']