Problem 689 · Hard

Maximum Sum of 3 Non-Overlapping Subarrays

Precompute the best window to each side of every position; the middle window then picks its best pair.

Open the interactive visualisation