Given an integer x, return true if x is palindrome integer.

An integer is a palindrome when it reads the same backward as forward.


	For example, 121 is a palindrome while 123 is not.


&nbsp;
Example 1:

Input: x = 121
Output: true
Explanation: 121 reads as 121 from left to right and from right to left.


Example 2:

Input: x = -121
Output: false
Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.


Example 3:

Input: x = 10
Output: false
Explanation: Reads 01 from right to left. Therefore it is not a palindrome.


&nbsp;
Constraints:


	-231&nbsp;&lt;= x &lt;= 231&nbsp;- 1


&nbsp;
Follow up: Could you solve it without converting the integer to a string?
class Solution(object):
   def isPalindrome(self,x):
       return str(x) == str(x)[::-1]
class Solution {
    public boolean isPalindrome(int x) {
        int sum = 0;
        int X = x;

        while(x > 0){
            sum = 10 * sum + x % 10;
            x /= 10;
        }

        return sum == X;
    }
}
class Solution {
public:
    bool isPalindrome(int x) {
        if (x < 0) {
            return false;
        }

        long long reversed = 0;
        long long temp = x;

        while (temp != 0) {
            int digit = temp % 10;
            reversed = reversed * 10 + digit;
            temp /= 10;
        }

        return (reversed == x);
    }
};
var isPalindrome = function(x) {
    if(x < 0 || x % 10 === 0 && x !== 0) return false

    let num = x
    let rev_x = 0

    while(x > 0){
        let digit = Math.floor(x % 10)
        rev_x = Math.floor(rev_x * 10 + digit)
        x = Math.floor(x / 10)
    }
    return num === rev_x
};
Palindrome Number