Skip to content

Commit c8f1bd1

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problems/312.burst-balloons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var maxCoins = function (nums) {
9494

9595
- 而对于 dp[i][j],i 和 j 之间会有很多气球,到底该戳哪个先呢?我们直接设为 k,枚举选择最优的 k 就可以了。
9696

97-
- 所以,最终的状态转移方程为:dp[i][j] = max(dp[i][j], dp[i][k] + dp[k][j] + nums[k] + nums[i] + nums[j])
97+
- 所以,最终的状态转移方程为:dp[i][j] = max(dp[i][j], dp[i][k] + dp[k][j] + nums[k] * nums[i] * nums[j])
9898

9999
3. 初始值和边界
100100

0 commit comments

Comments
 (0)