Modification Needed For Possible Overflow Situation


  • 0
    T

    Frankly speaking, this is quite a straightforward question, however, I am wondering if we need check the possible overflow situations like:
    [1,2147483647]
    -2147483648
    Under this condition, the online judgement will produce [0,1] while we all know this is incorrect.
    Also, we all know that this can be fixed by using long type to denotes the numbers :D


Log in to reply
 

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