Problem 2430 · Hard

Maximum Deletions on a String

From each position, delete the whole rest or a repeated prefix; a suffix DP keeps the best count for every start.

Open the interactive visualisation