Given an array of integers and a target K, find the length of the smallest contiguous subarray whose sum is >= K. If none exists, return -1.
nums = array of integers, K = target sum
Length of smallest subarray with sum >= K, or -1 if none
Example 1:
Input:
nums = [2,1,1,4,3,1,1] K = 8
Output:
3
Explanation:
Subarray [4,3,1] has sum 8 with length 3.