Is "51u" invalid?


  • 0
    C

    The expected answer is "false", but I think "51u" is an unsigned integer. Anything wrong?


  • 2
    S

    Don't think too much around it. I would say only string containing e might be a valid number, such as 1e10.


  • 0
    C

    Yeah, i was puzzled with the definition of "valid number". Maybe i confused "a valid number" with "a valid number in C“. Thank u so much.


  • 0
    S

    As a matter of fact, you might be a little bit confused between atoi and this problem. However, when you are taking an interviewer, never hesitated with asking such question to make you fully understand.


Log in to reply
 

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