Palindrome Number
EasyBit Manipulation & Math
Decode it first. Clues, constraints, pattern and plan before any code.Return true if the integer x reads the same forwards and backwards in decimal. Try to do it without converting the number to a string.
x = 121 → true
x = -121 → false (reads 121- backwards)
x = 10 → false (reads 01 backwards)Constraints
-2^31 <= x <= 2^31 - 1