Problem 1121 · Hard

Divide Array Into Increasing Sequences

Count the largest group of equal values; that many sequences must each reach length k, and dealing the sorted array round-robin builds them.

Open the interactive visualisation