更新代码块

This commit is contained in:
youngyangyang04
2021-08-10 22:20:48 +08:00
parent c7c34dd824
commit 8a2d42013c
192 changed files with 552 additions and 552 deletions

View File

@ -173,7 +173,7 @@ for循环每次从startIndex开始遍历然后用path保存取到的节点i
代码如下:
```C++
```CPP
for (int i = startIndex; i <= n; i++) { // 控制树的横向遍历
path.push_back(i); // 处理节点
backtracking(n, k, i + 1); // 递归控制树的纵向遍历注意下一层搜索要从i+1开始
@ -188,7 +188,7 @@ backtracking的下面部分就是回溯的操作了撤销本次处理的结
关键地方都讲完了组合问题C++完整代码如下:
```C++
```CPP
class Solution {
private:
vector<vector<int>> result; // 存放符合条件结果的集合