Palindrome Index Solution