摘要: https://leetcode.cn/problems/unique-paths-ii/description/?envType=study-plan-v2&envId=top-interview-150 思路很简单,让obstacleGrid[i][j]代表走到i, j所需要的步数,然后obst 阅读全文
posted @ 2024-04-27 15:50 peterzh6 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 题源:IOI飞入寻常百姓家 class Solution: def minimumTotal(self, triangle: List[List[int]]) -> int: n = len(triangle) dp = [[0] * (i + 1) for i in range(n)] dp[0] 阅读全文
posted @ 2024-04-27 14:58 peterzh6 阅读(3) 评论(0) 推荐(0) 编辑