uacs2024

导航

2024年3月7日 #

leetcode120. 三角形最小路径和

摘要: leetcode120. 三角形最小路径和 这道题的关键在于想到 dp[i][j] = min(dp[i-1][j-1] , dp[i-1][j]) + triangle[i][j]; 太久没做过算法题了,连设一个dp数组都没意识到 我的代码 class Solution { public: int 阅读全文

posted @ 2024-03-07 17:42 ᶜʸᵃⁿ 阅读(1) 评论(0) 推荐(0) 编辑