Pergunta de entrevista da empresa Eurofins

calculate Palindrome in a string and explain the approach.