BeingBong's blog

By BeingBong, history, 4 years ago, In English
  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
4 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Increase the size of dp,

instead of dp[m + 1][n + 1] write smth like dp[N][N] (where N > max(n, m))

»
4 years ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

because your code take time greater time , compare to what they asked it's the simpelest answer , not to write a blog for it