Problem 1946 · Medium

Largest Number After Mutating Substring

Maximize a digit string by replacing at most one contiguous substring with mapped digits. The visual shows the digit strip with a mapping table and a window that begins at the first digit the mapping improves.

Open the interactive visualisation