Python 1-liner. Functional programming.
Complexity\n- Time complexity: O(n \cdot k)\n\n- Space complexity: O(n \cdot k)\n\nwhere,\nn is length of words,\nk is length of the longest word.\n\n# Code\npy
# Complexity\n- Time complexity: $$O(n \\cdot k)$$\n\n- Space complexity: $$O(n \\cdot k)$$\n\nwhere,\n`n is length of words`,\n`k is length of the longest word`.\n\n# Code\n```python\nclass Solution:\n    def makeEqual(self, words: list[str]) -> bool:\n        return sum(map(mod, Counter(chain.from_iterable(words)).values(), repeat(len(words)))) == 0\n\n\n```
['Hash Table', 'String', 'Counting', 'Python', 'Python3']