To the admin : test case should consider the base


  • 2
    B

    should consider the base of 2, 8, and 16 , etc
    like "0xff" ---> 255, and "0xx"---> invalid , "b101" -> 5 "b123"-> 1 (2, 3 is invalid character here)


  • 2
    S

    Interesting catch.

    I believe it would be a great question when having a real interview. From my perspective, I would not make it that complicated.


Log in to reply
 

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