← 返回 goldmansachs 的题目列表Minimum Length Subarray Sum Greater or Equal Target
类型:online_judge
goldmansachs
Given an array containing non-negative integers and an integer target, find the minimum length of a contiguous subarray of which the sum is greater than or equal to target. If there isn't a subarray that meets the condition, return 0. The time complexity requirement is O(n).
Example
Input
[[2, 3, 1, 2, 4, 3], 7]