Shortest Palindrome Leetcode Problem Set 47