Skip to content

Commit f405766

Browse files
authored
Update 312.burst-balloons.md
1 parent c8f1bd1 commit f405766

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

problems/312.burst-balloons.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ var maxCoins = function (nums) {
9393
2. 状态转移方程
9494

9595
- 而对于 dp[i][j],i 和 j 之间会有很多气球,到底该戳哪个先呢?我们直接设为 k,枚举选择最优的 k 就可以了。
96-
97-
- 所以,最终的状态转移方程为:dp[i][j] = max(dp[i][j], dp[i][k] + dp[k][j] + nums[k] * nums[i] * nums[j])
96+
- 1。
97+
- 所以,最终的状态转移方程为:dp[i][j] = max(dp[i][j], dp[i][k] + dp[k][j] + nums[k] * nums[i] * nums[j]),其中 k 为 i + 1, i + 2... j - 1。
9898

9999
3. 初始值和边界
100100

0 commit comments

Comments
 (0)