Python Elegant & Short | DP
\nclass Solution:\n    """\n    Time:   O(n^2)\n    Memory: O(n^2)\n    """\n\n    def maxLength(self, sequences: List[str]) -> int:\n        dp = [set()]\n\n  
```\nclass Solution:\n    """\n    Time:   O(n^2)\n    Memory: O(n^2)\n    """\n\n    def maxLength(self, sequences: List[str]) -> int:\n        dp = [set()]\n\n        for seq in sequences:\n            chars = set(seq)\n\n            if len(chars) < len(seq):\n                continue\n\n            dp.extend(chars | other for other in dp if not (chars & other))\n\n        return max(map(len, dp))\n```\n\nIf you like this solution remember to **upvote it** to let me know.\n
['Dynamic Programming', 'Python', 'Python3']