Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Table of Contents generated with DocToc

回溯

最近提交时间 题目 题目难度 提交次数
13 分钟前 #51 N 皇后 困难 2 次
31 分钟前 #37 解数独 困难 3 次
1 天前 #47 全排列 II 中等 1 次
1 天前 #46 全排列 中等 2 次
1 天前 #491 递增子序列 中等 4 次
2 天前 #90 子集 II 中等 2 次
2 天前 #78 子集 中等 1 次
2 天前 #93 复原 IP 地址 中等 3 次
2 天前 #131 分割回文串 中等 2 次
2 天前 #40 组合总和 II 中等 2 次
2 天前 #39 组合总和 中等 4 次
2 天前 #17 电话号码的字母组合 中等 4 次
2 天前 #216 组合总和 III 中等 3 次
2 天前 #77 组合 中等 3 次

回溯模版

void backtracking(参数) {
    if (终止条件) {
        存放结果;
        return;
    }

    for (选择:本层集合中元素(树中节点孩子的数量就是集合的大小)) {
        处理节点;
        backtracking(路径,选择列表); // 递归
        回溯,撤销处理结果
    }
}

todo