Commencis interview question

Check if string is palindrome and improve performance