Problem 2272 · Hard

Substring With Largest Variance

For each pair of letters, run a Kadane-style scan that must include the second letter at least once.

Open the interactive visualisation