209. Minimum Size Subarray Sum

public class Solution {
    public int minSubArrayLen(int s, int[] nums) {
        if(nums.length==0||nums==null) return 0;
        int i=0,j=0,sum=0,min=Integer.MAX_VALUE;
        while(i=s){
                min=Math.min(min,i-j);
                sum-=nums[j++];
            }
        }
        return min==Integer.MAX_VALUE? 0:min;
    }
}

你可能感兴趣的:(209. Minimum Size Subarray Sum)