Problem 3557 · Medium

Find Maximum Number of Non Intersecting Substrings

A prefix DP picks the best number of non-overlapping substrings that are at least four letters long and share their first and last letter.

Open the interactive visualisation