LeetCode
P0ny
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 797. 所有可能的路径 python3 100%?
class Solution(object): def allPathsSourceTarget(self, graph): """ :type graph: List[List[int]] :rtype: List[List[int]] """ res = []原创 2018-09-11 11:38:16 · 563 阅读 · 0 评论 -
LeetCode 64.最小路径和 Python解答
分析:到达(m,n)有两种方式1.从(m-1,n)2.从(m,n-1) f(m,n)为从(0,0)到(m,n)所需的最小路径和。 则f(m,n)=min(f(m-1,n), f(m,n-1))+grid(m,n)class Solution(object): def minPathSum(self, grid): """ :type grid: ...原创 2018-09-06 11:18:39 · 858 阅读 · 0 评论
分享