Why we do not consider -2 + 2 + 1 = 1?


  • 0
    X

    In the second example case

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

    Why do we not consider -2 + 2 + 1 == 1, which makes 3 is the longest subarray length?


Log in to reply
 

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