I was quite surprises to see this test case:
Input: " -115579378e25"
since -115579378*10^25 definitely caused underflow. I tried
atoi("1e3") which gives me 1. Based on those test cases, I believe 'e' is invalid.
It would be very helpful to let the user know 'e' is invalid since in problem "Valid Number", 'e' is totally acceptable.
@panhejia This is very helpful. I was wondering the exact same thing.
I was quite surprises to see this test case too
Totally agree, what does -+1 means anyway?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.