摘要:        
还是套模板,模板可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def combine(self, n, k): """ :    阅读全文
posted @ 2020-11-23 16:38
人间烟火地三鲜
阅读(122)
评论(0)
推荐(0)
        
            
        
        
摘要:        
原串里有数字、也有字母,所以每选一个字符要加以判断,要是字母则有两种选择,数字就一种。 还是套模板,模板可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self):     阅读全文
posted @ 2020-11-23 16:36
人间烟火地三鲜
阅读(239)
评论(0)
推荐(0)
        
            
        
        
摘要:        
套模板,可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def subsetsWithDup(self, nums): ""    阅读全文
posted @ 2020-11-23 16:34
人间烟火地三鲜
阅读(79)
评论(0)
推荐(0)
        
            
        
        
摘要:        
套模板,可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def subsets(self, nums): """ :type    阅读全文
posted @ 2020-11-23 16:33
人间烟火地三鲜
阅读(101)
评论(0)
推荐(0)
        
            
        
        
摘要:        
套模板,可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def permuteUnique(self, nums): """    阅读全文
posted @ 2020-11-23 16:31
人间烟火地三鲜
阅读(73)
评论(0)
推荐(0)
        
            
        
        
摘要:        
套模板,可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def permute(self, nums): """ :type    阅读全文
posted @ 2020-11-23 16:30
人间烟火地三鲜
阅读(100)
评论(0)
推荐(0)
        
            
        
        
摘要:        
可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def combinationSum2(self, candidates,     阅读全文
posted @ 2020-11-23 16:28
人间烟火地三鲜
阅读(67)
评论(0)
推荐(0)
        
            
        
        
摘要:        
可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] def combinationSum(self, candidates, t    阅读全文
posted @ 2020-11-23 16:27
人间烟火地三鲜
阅读(94)
评论(0)
推荐(0)
        
            
        
        
摘要:        
可参考:https://www.cnblogs.com/panweiwei/p/14025143.html class Solution(object): def __init__(self): self.res = [] self.mydict = {1: "", 2: "abc", 3: "de    阅读全文
posted @ 2020-11-23 16:25
人间烟火地三鲜
阅读(312)
评论(0)
推荐(0)
        
            
        
        
摘要:        
参考:https://zhuanlan.zhihu.com/p/302415065 关于回溯 回溯是递归的“副产品”,并非高效算法,通过剪枝可以跳过非必要的搜索。 回溯算法能解决如下问题: 组合问题:N个数里面按一定规则找出k个数的集合; 排列问题:N个数按一定规则全排列,有几种排列方式; 切割问题    阅读全文
posted @ 2020-11-23 16:19
人间烟火地三鲜
阅读(418)
评论(0)
推荐(1)
        

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号