Vodafone interview question

They asked me a coding question. How to check if a string is a palindrome.