摘要: # # @lc app=leetcode.cn id=70 lang=python3 # # [70] 爬楼梯 # # @lc code=start class Solution: def climbStairs(self, n: int) -> int: if n == 1: return 1 i 阅读全文
posted @ 2020-11-06 12:30 douzujun 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 注意,Python初始化一个二维数组 不能用 [[0] * col] * row,这样每行创建的是 [0]*col的引用!!!!!! 使用 [[0] * col for _ in range(row)] 阅读全文
posted @ 2020-11-06 11:18 douzujun 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 64. 最小路径和 注意,Python初始化一个二维数组,不能用 [[0] * col] * row,这样每行创建的是 [0]*col的引用!!!!!! 使用 [[0] * col for _ in range(row)] # # @lc app=leetcode.cn id=64 lang=pyt 阅读全文
posted @ 2020-11-06 11:16 douzujun 阅读(79) 评论(0) 推荐(0) 编辑