iDatalytics interview question

write the code to check the string is palindrome