Problem 3144 · Medium

Minimum Substring Partition of Equal Character Frequency

Fill a table of best piece counts for each prefix, trying every balanced piece that ends at that prefix.

Open the interactive visualisation