Python || recursion || backtracking
Backtracking + recursion\n## Time -> O(2^N) {N is length of columns}\n## Space -> O(cols)\n\n\nclass Solution:\n    def maximumRows(self, mat: List[List[int]], 
# Backtracking + recursion\n## Time -> O(2^N) {N is length of columns}\n## Space -> O(cols)\n\n```\nclass Solution:\n    def maximumRows(self, mat: List[List[int]], cols: int) -> int:\n        res = []\n        M = len(mat)\n        N = len(mat[0])\n        def check(seen):\n            count = 0\n            for row in mat:\n                flag = True\n                for c in range(N): \n                    if row[c] == 1:\n                        if c in seen:\n                            continue\n                        else:\n                            flag = False\n                            break\n                if flag:    \n                    count +=1   \n            res.append(count)\n                     \n        def solve(c,seen,cols):\n            if cols == 0:\n                check(seen)\n                return\n            if c == N:\n                return\n            else:\n                seen.add(c)\n                solve(c+1,seen,cols-1)\n                seen.remove(c)\n                solve(c+1,seen,cols)\n        seen = set()\n        solve(0,seen,cols)\n        return max(res)\n```
['Backtracking', 'Recursion', 'Python', 'Python3']