Shortest Palindrome Leetcode Problem Set 3