Missing Test Case


  • 0
    D

    Overflow case.

    Input:
    [2147483647, 2, 3]
    -2147483647

    Expected Output: 0

    Currently sample solution returns 2 (i.e. from expected result) but correct code should return 0.


  • 0

    Thanks, I have updated the description which mentions "The sum of the entire array is guaranteed to fit within the 32-bit signed integer range", so we won't have to consider such overflow test case.


Log in to reply
 

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