The problem, in one line. Given a list of positive numbers and a target, find the length of the shortest unbroken run whose sum reaches the target, or 0 if none does. LeetCode 209.
The tell. “Shortest unbroken run” that must reach a threshold, with every number positive. Adding a number can only raise the sum and removing one can only lower it, so the window has a clear moment to grow and a clear moment to shrink.