class Solution(object):
def uniqueOccurrences(self, arr):
"""
:type arr: List[int]
:rtype: bool
"""
mydict = {}
for item in arr:
if item in mydict.keys():
mydict[item] += 1
else:
mydict[item] = 1
vals = sorted(mydict.values())
i, j = 0, 1
while j < len(vals):
if vals[i] == vals[j]:
return False
i += 1
j += 1
return True