 All Problems
Palindrome Number
easy
math
amazon
microsoft

Given an integer x, return true if x is a palindrome, and false otherwise.

Example 1:

Input: x = 121
Output: true

Example 2:

Input: x = -121
Output: false

Example 3:

Input: x = 10
Output: false

Follow up: Could you solve it without converting the integer to a string?

Constraints: -2^31 <= x <= 2^31 - 1

Run to check your code against the sample cases, or submit to run every case