AND Digital Interview Question

Write an efficient palindrome algorithm.