Question d’entretien chez Amazon

write a function that validates whether a string is a palindrome