209. Minimum Size Subarray Sum
209. Minimum Size Subarray Sum
class Solution:
def minSubArrayLen(self, target: int, nums: List[int]) -> int:
slow = 0
fast = 0
total = 0
res = float('inf')
while fast < len(nums):
total += nums[fast]
while total >= target:
res = min(res, fast - slow + 1)
total -= nums[slow]
slow += 1
fast