Pregunta de entrevista de Toast Inc

Early stage tech task was to code a function checking if a string is a palindrome, with a minor complication.