accept

Find the contiguous subarray within an array (containing at least one
number) which has the largest product.

For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest product = 6.
accept

Given a string s, partition s such that every substring of the partition
is a palindrome.

Return all possible palindrome partitioning of s.
time limit exceeded
accepted

use 1-d array instead of 2d array to store the status
more elegent algorithm

be aware of the boundary cuts[len] = -1