takealot.com Interview Question

How would you write a palindrome function ? Time complexity ?