Created my own stack, and try to organize the code for palindrome partitioning II