Mphasis Interview Question

Explain about Palindrome program logic