Question should specify input restrictions (no negative numbers)

  • 0

    This is a nice question to get warmed up. However, the question should specify that negative integers are not permitted. As written, it is undefined if -334433 is considered a valid palindrome or not, for example. On the number line, it is clearly a palindrome. As a string, it is not, due to the extra character in front, but this question is explictly about integers.

    The choice to not allow negatives seems arbitrary so should be made specific.

Log in to reply

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