solulubeta
Sign in
Story Problems / Arrays, windows & two pointers
01.02 · Problem

Longest Calm Stretch

Medium Variable window (sum ≤ limit, non-negative values) Pro

This problem is part of solulu Pro

A weather station records the rainfall (in mm) of each day. A stretch of consecutive days is called *calm* if the total rainfall over the stretch does not exceed the flood limit. Find the number of days in the longest…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 2 of 94 · updated 2026-10-12