The IDE is broken because this got accepted with full marks


#1

int Solution::isPalindrome(int A) {
int n=A;
int remainder =0;
while(n>0)
{
remainder = (remainder*10)+n%10;
n/=10;
}
if(remainder == A)
return 1;
else return 0;
}


#2

I see nothing wrong with this.


#3

You should only get full marks for doing this I’m constant space


#4

Integer variables don’t count towards space complexity.