I'm so confused. Why the character 'a' is valid?
Because the string can contain additional characters after those that form the integral number, which are ignored.
Meet similar test case like Input:" -0012a42"should return -12
And why the test case "1095502006p8" return "2147483647" instead of "1095502006"?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.