SAP Interview Question

They have asked to solve palindrome problem