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.
Each round takes one copy of every value still present, in increasing order. Keep repeating rounds until the multiset is empty.