The following codes got AC but it will fail at a test case with s = INT_MAX

```
class Solution {
public:
int minSubArrayLen(int s, vector<int>& nums) {
int sum = 0;
int L = 0;
int result = INT_MAX;
for(int i = L; i <nums.size();i++)
{
L++;
sum += nums[i];
if(sum >= s)
{
while(sum >= s) sum -= nums[i - (--L)];
result = min(result,L+1);
}
}
if(result == INT_MAX) return 0;
return result;
}
};
```