Rust/Python linear solution constant space with explanation
Intuition\n\nAs you can move characters anywhere in the words, you just need the number of times each character can you seen. Then if you have x number of times
# Intuition\n\nAs you can move characters anywhere in the words, you just need the number of times each character can you seen. Then if you have `x` number of times you seen a character then you just need to see whether you can divide them into $n$ words.\n\nWhen you store character to counts, you can store them in a dictionary (like I have done in python). But it is better to store them in an array (like I have done in rust). Both are constant time, but constant is way smaller in array.\n\n# Complexity\n- Time complexity: $O(n)$, where n in the number of characters\n- Space complexity: $O(1)$\n\n# Code\n```Rust []\nimpl Solution {\n  pub fn make_equal(words: Vec<String>) -> bool {\n    let mut cnt = [0; 26];\n    let n = words.len();\n    for w in words {\n      for c in w.into_bytes() {\n        cnt[c as usize - 97] += 1;\n      }\n    }\n    \n    for i in 0 .. 26 {\n      if cnt[i] % n != 0 {\n        return false;\n      }\n    }\n    return true;\n  }\n}\n```\n```python []\nfrom collections import defaultdict\n\nclass Solution:\n  def makeEqual(self, words: List[str]) -> bool:\n    cnt = defaultdict(int)\n    for w in words:\n      for c in w:\n        cnt[c] += 1\n    \n    for v in cnt.values():\n      if v % len(words):\n        return False\n    \n    return True\n```
['Python3', 'Rust']