Pregunta de entrevista de Cognizant

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