DP explanation

  • 4

    I read the post of @dietpepsi . It's a great post but I think the explanation is a little bit complex. We could just take dp[left][right] as the coins we got after burst all balloons between left and right (exclusive).
    Thus, dp[left][right] = nums[left] * nums[k] * nums[right] + dp[left][k] + dp[k][right]

  • 1

    Thanks very much for the explanation. It really made my mind straight. Very helpful.

Log in to reply

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