String Palindrome Problem

My Own Logic:

Another logic:

Simple:

another good logic: