Problem 1246 · Hard

Palindrome Removal

Fill a table of cheapest clearing costs for every range, pairing equal ends after the middle is removed.

Open the interactive visualisation