Unique Number of Occurrences Problem

Unique Number of Occurrences Problem — ExecCode Easy DSA Practice

Solve the Unique Number of Occurrences problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given an array of integers arr, return true if the number of occurrences of each value in the array is unique or false otherwise.

Examples

Input {"arr": [1, 2, 2, 1, 1, 3]}; Output True. Input {"arr": [1, 2]}; Output False

Constraints

1 <= arr.length <= 1000 -1000 <= arr[i] <= 1000

Practice Unique Number of Occurrences free on ExecCode. Browse DSA problems, topic map, and placement guides.