1941. Check if All Characters Have Equal Number of Occurrences

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1941

class Solution:
    def areOccurrencesEqual(self, s: str) -> bool:
        cnt = Counter(s)
        return len(set(cnt.values())) == 1