Approach hintTry it first, then revealHide
Negative numbers and numbers ending in 0, other than 0 itself, are not palindromes. Otherwise reverse only the second half of the digits and compare it with the first half, which also avoids overflow.
Negative numbers and numbers ending in 0, other than 0 itself, are not palindromes. Otherwise reverse only the second half of the digits and compare it with the first half, which also avoids overflow.