Cognizant Interview Question

Was asked to write a simple palindrome code