Problem 2272 · Hard
For each pair of letters, run a Kadane-style scan that must include the second letter at least once.
Open the interactive visualisation