Amazon interview question

Code for string Palindrome in O(n)