Problem 3458 · Medium

Select K Disjoint Special Substrings

Decide whether k non-overlapping substrings can be chosen from s, where the letters of each substring occur nowhere outside it and no substring is the whole string.

Open the interactive visualisation