What am i missing here?


#1

int Solution::isPalindrome(string A) {

int b,e;
b=0;
e=int(A.size())-1;
while(b<e)
{
    if(!isalnum(A[b]))
        b++;
    
        
    if( !isalnum(A[e]) )
        e--;
        
    A[b]=tolower(A[b]);
    A[e]=tolower(A[e]);
    
    if(A[b] != A[e])
        return 0;
    else
    {
        b++;
        e--;
    }
}
return 1;

}


#2

Did you checked your isalnum function