Skip to content

Commit a823ef1

Browse files
committed
solve 1207
1 parent 09eff76 commit a823ef1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# @lc app=leetcode id=1207 lang=python3
3+
#
4+
# [1207] Unique Number of Occurrences
5+
#
6+
from typing import List
7+
# @lc code=start
8+
class Solution:
9+
def uniqueOccurrences(self, arr: List[int]) -> bool:
10+
count_dic = {}
11+
for num in arr:
12+
count_dic[num] = count_dic.get(num, 0) + 1
13+
return len(count_dic) == len(set(count_dic.values()))
14+
15+
# @lc code=end
16+

0 commit comments

Comments
 (0)