String Palindrome Problem

Can anyone help me solving this problem.
Link to problem : CODE1603 Problem - CodeChef
I went through the editorial but I couldn’t understand much.
Thanks in advance