Problem 2207 · Medium

Maximize Number of Subsequences in a String

Insert one character into a string to maximise the number of occurrences of a two-character subsequence. The visual counts the subsequence matches before and after each candidate insertion.

Open the interactive visualisation