palindrome partitioning, dynamic programming