update second solution of palindrome-partitioning