AND Digital interview question

Write an efficient palindrome algorithm.