Leetcode 209. Minimum Size Subarray Sum
Find the length of the shortest contiguous subarray of positive integers whose sum is at least a given target (return 0 if none exists). This is a classic sliding-window / two-pointer problem exploiting positivity of nums to get an O(n) solution (follow-up asks for an O(n log n) alternative).
Asked at:
toast
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid August, 2025
toast
Staff
Your account is free and you can post anonymously if you choose.