Cisco interview question

How to write code to check a pallindrome.