Answers for "check if the given string is a palindrome or not o(1) pp"

C
0

check if a string is a palindrome

int length = myString.Length;
for (int i = 0; i < length / 2; i++)
{
    if (myString[i] != myString[length - i - 1])
        return false;
}
return true;
Posted by: Guest on October-30-2021

Code answers related to "check if the given string is a palindrome or not o(1) pp"

Code answers related to "C"

Browse Popular Code Answers by Language