Domanda di colloquio di takealot.com

How would you write a palindrome function ? Time complexity ?