I don't understand why this case return this result


  • 0
    Z

    Can someone explain why this case return -12.I think if the input is unvalid,we should return 0?
    Input:" -0012a42"
    Output:0
    Expected:-12


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.