Problem 2707 · Medium

Extra Characters in a String

Find the fewest leftover characters by choosing where dictionary words end in each prefix.

Open the interactive visualisation