Leetcode Palindrome Question