What to return if invalid input?


  • 0
    S

    You mentioned

    "If the first sequence of non-whitespace characters in str is not a valid integral number, or if no such sequence exists because either str is empty or it contains only whitespace characters, no conversion is performed."

    But the function does require a integer to return. What shall we return if we face an invalid input?


Log in to reply
 

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