Shortest Palindrome Leetcode Problem Set 2