魁梧山水

文章
4
资源
1
加入时间
3年0月21天

动态规划解决 三角形最小路径和

class Solution { public int minimumTotal(List<List<Integer>> triangle) { int len = triangle.size(); //dp[i][j]代表顶部到(i, j)的最小路径和 int[][]dp = new int[len][len]; //初始化边界条件 dp[0][0] = tria