All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : September 25, 2024
Last updated : September 25, 2024
Related Topics : Array, Hash Table
Acceptance Rate : 78.07 %
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
cnt = Counter(arr)
return len(cnt.values()) == len(set(cnt.values()))