Problem 3316 · Medium

Find Maximum Removals From Source String

Maximum removals: keep the fewest target indices the pattern needs, using a DP over pattern prefixes; every other target can be deleted.

Open the interactive visualisation