Given an array C of repeat counts, produce a sorted 1-D array A:
C
A
C[i]
i
len(C) - 1
Input
[0 2 1 1 2 0 1]
Output
[1 1 2 3 4 4 6]
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)