#include
#include
using namespace std;
bool isp(char *a)
{
int i=0;
int j=strlen(a)-1;
if(strlen(a)==0 || strlen(a)==1)
{
return true;
}
while(i<j)
{
if(a[i]==a[j])
{
i++;
jā;
}
else
{
return false;
}
}
return true;
}
int main() {
int n;
bool r;
cin>>n;
char a[n];
cin>>a;
r = isp(a);
//cout<<r;
if(r==true)
{
cout<<ātrueā;
}
else{
cout<<āfalseā;
}
return 0;
}
this is my codeā¦ I am not able to pass all the test cases, can you please guide me?