class Solution {
public:
bool isPalindrome(int x) {
string s1=to_string(x);
string s=to_string(x);
int n=s.length();
for(int i=0;i<n/2;i++)
{
swap(s[i],s[n-1-i]);
}
if(s1==s) return true;
else return false;
}
};