[Python3] Backtracking + Bit Manipulation - Simple Solution
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: $$O(M*2^N)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(N)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nWith `M` is maximum length of a string in `arr` and `N` is length of the `arr`\n\n# Code\n```\nclass Solution:\n    def maxLength(self, arr: List[str]) -> int:\n        n = len(arr)\n        def get_new_bit(bit: int, cur: str) -> int:\n            for c in cur:\n                if 1 << (ord(c) - ord("a")) & bit: return -1\n                bit |= 1 << (ord(c) - ord("a"))\n            return bit\n\n        def helper(bit: int, i: int) -> int:\n            if i == n: return 0\n            res = 0\n            for j in range(i, n):\n                new_bit = get_new_bit(bit, arr[j])\n                if new_bit == -1: continue\n                res = max(res, len(arr[j]) + helper(new_bit, j + 1))\n            return res\n\n        return helper(0, 0)\n```
['Array', 'String', 'Backtracking', 'Bit Manipulation', 'Python3']