Palindrome Integer

Determine whether an integer is a palindrome. Do this without extra space.

A palindrome integer is an integer x for which reverse(x) = x where reverse(x) is x with its digit reversed.
Negative numbers are not palindromic.

Example :

Input : 12121
Output : True

Input : 123
Output : False
Interview Code Editor
  • Solution Approach
  • Complete Solution
15391 successful submissions.
Asked In:
  • HCL
Click here to jump start your coding interview preparation