does there have one valid palindrome number that will overflow when reversed

  • 0

    The int.MaxValue is 2147483647, I think the biggest the palindrome number will be 2147447412, right?
    In this case, we can reverse the whole number and compare with original number, if overflow happens, the result is still correct, it will return false.
    Do I understand correctly, any other thinking?

Log in to reply

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