![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dfs
feeeeeeet
这个作者很懒,什么都没留下…
展开
-
Leetcode 77. Combinations
recursion &dfs recursion(slow) class Solution: def combine(self, n, k): """ :type n: int :type k: int :rtype: List[List[int]] """ res = [] ...原创 2018-12-29 06:52:33 · 131 阅读 · 0 评论 -
Leetcode 78 & 90. Subsets I&II
class Solution: def subsets(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ res=[] self.dfs(nums,0,[],res) return r原创 2018-12-30 00:44:53 · 101 阅读 · 0 评论 -
Leetcode 79. Word Search
dfs 66.9% class Solution: def exist(self, board, word): """ :type board: List[List[str]] :type word: str :rtype: bool """ def dfs(index,row...原创 2018-12-30 09:18:19 · 96 阅读 · 0 评论