Please try to ask a more precise question. With the information above I do not even know for sure which problem you try to solve. There are a lot more problems addressing palindromes than just http://www.spoj.com/problems/PALIN/