Premium problem114. Count Occurrences of Each Unique Value

Easy Locked

Return, for the 1-D array x, the number of times each unique value occurs, as a 1-D array of counts ordered by ascending value.

Input

[3 1 2 3 3 1]

Output

[2 1 3]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)