标签:tco sel port unique ons import not else cti
1 import collections 2 class Solution: 3 def uniqueOccurrences(self, arr: List[int]) -> bool: 4 obj = collections.Counter(arr).items() 5 dic = {} 6 for o in obj: 7 if o[1] not in dic: 8 dic[o[1]] = o[0] 9 else: 10 return False 11 return True
标签:tco sel port unique ons import not else cti
原文地址:https://www.cnblogs.com/asenyang/p/11622246.html