Capgemini interview question

Hard questions, string palindrome in Java