For the test case bellow, I think it's incorrect and the test cases should be updated.
Input: -2147483648, -1
I'm confused too, 2147483648 is 2^31, overflow happen because it is negative?
because signed 32bit int's range is -2147483648~2147483647,your output 2147483648 is overflow so return MAX_INT
the range of int32 is -2^31~2^31-1, so it overflows
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.