Problems > Coldest Stretch > Editorial

Coldest Stretch — Solution & Editorial

Back to the Problem

Slide a fixed window keeping the running sum and remember the best (strictly smaller) start.

Complexity: O(N)