"You may assume there are no leading 0", but there is a list with a leading 0!

  • 0

    Test case 1277 / 1562 of this challenge has a list with a leading 0 while the instruction say that there would be no test case with a leading 0. Am I misunderstanding the instructions or did I actually spot an issue?

    75386568 // I am printing the reverse number I obtained from the list and of course the 0 is lost.

  • 1

    Looks like you already forgot that the list stores the digits in reverse order. That zero isn't leading, it's the number's last digit (in its decimal representation).

  • 0

    thanks for the clarification. I thought leading in the list not in the number.

Log in to reply

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