This commit is contained in:
youngyangyang04
2020-11-17 17:12:33 +08:00
parent db295f4fca
commit c01adfa6bc
5 changed files with 24 additions and 22 deletions

View File

@@ -89,7 +89,7 @@ void backtracking(int n, int row, vector<string>& chessboard) {
* 递归终止条件
在如下树形结构中:
![51.N皇后](https://img-blog.csdnimg.cn/20201116173551789.png)
![51.N皇后](https://img-blog.csdnimg.cn/20201117165155239.png)
可以看出,当递归到棋盘最底层(也就是叶子节点)的时候,就可以收集结果并返回了。