Fixing Code Issues for C++ Users: Try before submitting your code

The integer being passed on to this function is an unsigned int. So, the function typecast the integer from unsigned int to int leading to errors.

A simple solution for this error would be to declare an unsigned int variable in your code and then typecasting passed variable again to unsigned. Something like this.

int Solution::isPalindrome(int C) {
unsigned int A=C;
//your code goes here

Click here to start solving coding interview questions