easy
math
Given an integer x, return true if x is a palindrome, and false otherwise.
An integer is a palindrome when it reads the same forward and backward. For example, 121 is a palindrome while 123 is not.
Note that negative numbers are never palindromes because of the leading minus sign.
Try to solve it without converting the integer to a string.
Examples
Example 1
Input: x = 121
Output: true
Example 2
Input: x = -121
Output: false
Example 3
Input: x = 10
Output: false
Running will execute all 3 cases.