The test case fails to test any input string which has a '0' not at the last place.

  • 0

    input "0000000002"

    should have the result exactly same as "2"

    but the test case didn't test it, so let a lot of incorrect solution accepted!

  • 0

    Yes, it seems the test cases don't include '0' or '1'.

Log in to reply

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