This commit is contained in:
krahets
2023-02-26 19:22:52 +08:00
parent 8e0872643c
commit cf26cd551a
17 changed files with 20 additions and 42 deletions
-4
View File
@@ -16,8 +16,6 @@ comments: true
![二叉树的层序遍历](binary_tree_traversal.assets/binary_tree_bfs.png)
<p align="center"> Fig. 二叉树的层序遍历 </p>
### 算法实现
广度优先遍历一般借助「队列」来实现。队列的规则是“先进先出”,广度优先遍历的规则是 ”一层层平推“ ,两者背后的思想是一致的。
@@ -258,8 +256,6 @@ comments: true
![二叉搜索树的前、中、后序遍历](binary_tree_traversal.assets/binary_tree_dfs.png)
<p align="center"> Fig. 二叉树的前 / 中 / 后序遍历 </p>
<div class="center-table" markdown>
| 位置 | 含义 | 此处访问结点时对应 |