寿爹座 发表于 2025-6-7 10:08:05

算法day29-动态规划(2)

目录


[*]不同路径
[*]不同路径II
[*]整数拆分
[*]不同的二叉搜索树
一、不同路径

https://leetcode.cn/problems/unique-paths/description/?envType=problem-list-v2&envId=8At1GmaZ

 
class Solution {    public int uniquePaths(int m, int n) {      //1.dp:到达(i,j)这个位置这么多条路径      //2.dp = dp + dp;      //3.初始化      int[][] dp = new int;      for(int i=0; i
页: [1]
查看完整版本: 算法day29-动态规划(2)