Very very easy logic in c++


#1

Comment body goes here.int Solution::isPalindrome(int A) {

string s1=to_string(A),s2="";
for(int i=s1.size()-1;i>=0;i--){
    s2+=s1[i];
}
if(s1==s2){
    return 1;
}
return 0;

}


#2

bro you can use
s2 = s1;
reverse(s2.begin(), s2.end());
rather than using for loop.