Palindrome partitioning minimum cut: Time limited with TOP-DOWN dynamic programming


  • 0
    D

    Hi, guys:
    In this problem, I try to use top-down dynamic programming to find the minimum cut. But I get a time limited. I use an array cache[s.length()][s.length()] to keep the minimum cut of s.substring(i,j){i,j = 0...s.length()-1}. I search some solutions in google, and I find that many solutions are based bottom-up dynamic programming. Thank you for your comment!


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.