2025. Redistribute Characters to Make All Strings Equal
My accepted Python solution to LeetCode problem 2025, Redistribute Characters to Make All Strings Equal, running in 31ms.
- Difficulty: Easy
- Python
- Runtime 31ms
- Memory 17.6MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 31ms, memory 17.6MB, accepted 2025-12-30.
class Solution:
def makeEqual(self, words: List[str]) -> bool:
from collections import Counter
total_chars = Counter()
for word in words:
total_chars += Counter(word)
n = len(words)
for count in total_chars.values():
if count % n != 0:
return False
return True