Least You Need to Know: Monotonic Deques, Prefix Sums, and Shortest Valid Windows
Les openen
Some subarray problems use prefix sums plus a monotonic deque over prefix indices. The deque keeps promising earlier prefixes in increasing order so the current prefix can quickly detect the shortest earlier start that already makes the sum large enough.