LeetCode: https://leetcode.com/problems/minimum-size-subarray-sum/
Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray whose sum is at least target. If there is no such subarray, return 0.
l
2
0
3
1
1
2
2
3
4
4
3
5
cur=0
target=7
best=inf
Step 1 / 5
Step 1:
Initialize window: l=0, cur=0, best=∞. Expand r one step at a time.
Pointers: l=0, r=-1
Focus: default
cur=0target=7best="inf"