Publicis Sapient Interview Question

Check palindrome.