class Solution {
public:
bool isPalindrome(int x) {
if(x < 0) return false;
string temp = to_string(x);
int l,r;
for(l = 0,r = temp.size() - 1;l < r;l++,r--){
if(temp[l] != temp[r]){
return false;
}
}
return true;
}
};
class Solution {
public:
bool isPalindrome(int x) {
if(x < 0) return false;
string temp = to_string(x);
int l,r;
for(l = 0,r = temp.size() - 1;l < r;l++,r--){
if(temp[l] != temp[r]){
return false;
}
}
return true;
}
};