Problem 2472 · Hard

Maximum Number of Non-overlapping Palindrome Substrings

Build a palindrome table, then extend a best-count array one end position at a time using palindromes of length at least k.

Open the interactive visualisation