Palindrome Partition solution