A palindrome number looks the same when you read it forwards and backwards. Given an integer x, return true if it is a palindrome, and false if it is not.
As a challenge, try to solve it without turning the number into a string.
Examples
Example 1:
Input: x = 1331
Output: true
Explanation: It reads 1331 in both directions.
Example 2:
Input: x = -88
Output: false
Explanation: From left to right it is -88, and from right to left it is 88-. They are not the same.
Example 3:
Input: x = 120
Output: false
Explanation: Read backwards it is 021, which is not 120.