Problem 2052 · Medium

Minimum Cost to Separate Sentence Into Rows

Wrap whole words into rows with minimum squared unused-space cost, excluding the last row.

Open the interactive visualisation