well, if the input is "--1". We will get -1.
what's the difference between the two cases? Just because " ++1" has a blank?
the answer of the case '--1' is still 0;
in the case '++1', the 1st '+' is the sign and the 2ed '+' is not a valid integral number,so the answer is 0;
that make sense. thank you!
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.