I have a question about this example case given with this problem:

Example 2:

Given nums = [-2, -1, 2, 1], k = 1,

return 2. (because the subarray [-1, 2] sums to 1 and is the longest)

Does the subarray of -2 + 2 + 1, with a length of 3 not equal 1 to satisfy the problem, and if that subarray is not a candidate to solve the problem, can you please explain why?