Pergunta de entrevista da empresa Apple

Palindrome leetcode question standard solution.