Palindrome Number
Problem statement
Given a signed integer x, return whether its decimal representation reads the same from left to right and right to left.
Negative integers are not palindromes.
Function
isPalindromeNumber(x: int) → booleanExamples
Example 1
x = 121return = true121 reads identically in both directions.
Example 2
x = -121return = falseThe minus sign has no matching suffix.
Constraints
xis a 32-bit signed integer.