Solve "palindrome partition' problem in leetcode, O(n^2) pre-process, number of combinations for partitioning.