I think "abc-2" should be -2. however expected = 0.
also why "+-4" = 0 ?? just don't make sense to me...
When input testcase is "+2abc2", expected answer is 2, so it seems that this String to Integer question aims to obtain an answer of compliant integer from the leftmost side of the stirng
If the given string is illegal, your answer should be 0.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.