takealot.com interview question

How would you write a palindrome function ? Time complexity ?