class Solution {
public:
bool isPalindrome(int x) {
int a=0;
int b=x;
if(x<0)
return false;
while(x>0)
{
a=10*a+x%10;
x=x/10;
}
if(a==b)
return true;
else
return false;
}
};
public:
bool isPalindrome(int x) {
int a=0;
int b=x;
if(x<0)
return false;
while(x>0)
{
a=10*a+x%10;
x=x/10;
}
if(a==b)
return true;
else
return false;
}
};