Why is '0' a valid input?


  • 1
    N

    The questions asks number of ways to decode a string. In my opinion, it should just give a valid string which could at least be decoded. I might be wrong int assuming that, but then could somebody explain that why is 'pqr' not a valid input to the question as we are supposed to give invalid/non-decodeable strings to the program anyways.
    The OJ provides 1 as answer when 'pqr' is provided as input.


Log in to reply
 

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