Unique Number of Occurrences

Easy · Hashing · about 5 minutes

Asked at Google, Amazon, Bloomberg, Meta, Microsoft.

Count how many times each distinct value appears in arr. Return true if no two distinct values share the same count.

Related guides