Problem 2610 · Medium

Convert an Array Into a 2D Array With Conditions

Send the k-th copy of each value to row k, so no row repeats a value and the number of rows equals the largest count.

Open the interactive visualisation