You are given an array of positive integers nums and a positive integer target.
Your task is to find the smallest length of a contiguous subarray whose sum is greater than or equal to target.
If no such subarray exists, return 0.
Input: target = 15, nums = [5,1,3,5,10,7,4,9,2,8]
Output: 2
Input: target = 9, nums = [2,3,1,2,4,3]
Output: 2
Input: target = 20, nums = [1,2,3,4,5]
Output: 0
Accepted:
Submission: