LeetCode 算法题【Easy】:9. Palindrome Number
Question
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 while123
is not.
Example 1:
1 | Input: x = 121 |
Example 2:
1 | Input: x = -121 |
Example 3:
1 | Input: x = 10 |