Pergunta de entrevista da empresa Cognizant

Write the code to check if the given string is a palindrome or not