Problem 3983 · Medium

Subsequence After One Replacement

Match prefixes and suffixes greedily, then look for one position where a replacement letter fits between them.

Open the interactive visualisation