085:不同路径
LeetCode 62 https://leetcode.cn/problems/unique-paths/description/ 难度:中等 高频面试题汇总:https://www.yuweihung.com/posts/2025/lc-hot/ 基础的网格图 DP。 时间复杂度:O(mn)。 空间复杂度:O(mn)。 ...
LeetCode 62 https://leetcode.cn/problems/unique-paths/description/ 难度:中等 高频面试题汇总:https://www.yuweihung.com/posts/2025/lc-hot/ 基础的网格图 DP。 时间复杂度:O(mn)。 空间复杂度:O(mn)。 ...
LeetCode 64 https://leetcode.cn/problems/minimum-path-sum/description/ 难度:中等 高频面试题汇总:https://www.yuweihung.com/posts/2025/lc-hot/ 网格图 DP 题目。f 数组初始化为 INF,f[0][1] = 0。 f[i + 1][j + 1] = min(f[i + 1][j], f[i][j + 1]) + grid[i][j]; 时间复杂度:O(mn),其中 m 和 n 分别为 grid 的行数和列数。 空间复杂度:O(mn)。 ...