This commit is contained in:
krahets
2023-06-17 00:46:08 +08:00
parent 202be07015
commit d6e27ba58b
5 changed files with 21 additions and 24 deletions

View File

@@ -172,7 +172,7 @@ comments: true
二叉树涉及的术语较多,建议尽量理解并记住。
- 「根节点 Root Node」位于二叉树顶层的节点没有父节点
- 「叶节点 Leaf Node」没有子节点的节点其两个指针均指向 $\text{null}$
- 「叶节点 Leaf Node」没有子节点的节点其两个指针均指向 $\text{None}$
- 节点的「层 Level」从顶至底递增根节点所在层为 1
- 节点的「度 Degree」节点的子节点的数量。在二叉树中度的范围是 0, 1, 2
- 「边 Edge」连接两个节点的线段即节点指针
@@ -545,7 +545,7 @@ comments: true
- 完美二叉树是理想情况,可以充分发挥二叉树“分治”的优势;
- 链表则是另一个极端,各项操作都变为线性操作,时间复杂度退化至 $O(n)$
![二叉树的最佳与最差结构](binary_tree.assets/binary_tree_corner_cases.png)
![二叉树的最佳与最差结构](binary_tree.assets/binary_tree_best_worst_cases.png)
<p align="center"> Fig. 二叉树的最佳与最差结构 </p>