# I don't know how the case 11, [1,2,3,4,5] , expected answer is 3

• For array [1,2,3,4,5], obviously, there is no sub array whose sum equal 11.

So I think there answer is 0.

consecutive sub array , right ?

• It does not have to be equal, it could be greater too. In this case 3+4+5=12>11.

• Thanks for your clarification. I thought it's equal....

• @iryan This tripped me too.
The question has a typo it showed as: "Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ? s."
For the ? I assumed it was =. Oh well so much time wasted.

• @administrators typo in the description, truly wasted my time
"Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ? s."

• Please fix the typo @administrators, so that others may not waste their time like us!

• ought it's equa

"For example, given the array [2,3,1,2,4,3] and s = 7,
the subarray [4,3] has the minimal length under the problem constraint."

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.