Problem 4065 · Medium

Rearrange Array by Removing Distinct Values

Each round takes one copy of every value still present, in increasing order. Keep repeating rounds until the multiset is empty.

Open the interactive visualisation