Premium problem115. Index of First Occurrence of Each Unique Value

Easy Locked

Return, for the 1-D array x, the index (into x) of the first occurrence of each unique value, ordered by ascending value.

Input

[3 1 2 3 3 1]

Output

[1 2 0]

Premium problem

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

Implement solve(...)