Remove center-table from docs.

Add header to the tables.
This commit is contained in:
krahets
2023-08-19 19:22:08 +08:00
parent 4eb621dda7
commit 70227c82cb
18 changed files with 26 additions and 78 deletions

View File

@@ -548,14 +548,11 @@
![二叉树的最佳与最差结构](binary_tree.assets/binary_tree_best_worst_cases.png)
如下表所示,在最佳和最差结构下,二叉树的叶节点数量、节点总数、高度等达到极大或极小值。
<div class="center-table" markdown>
<p align="center"> 表:二叉树的最佳与最差情况 </p>
| | 完美二叉树 | 链表 |
| ----------------------------- | ---------- | ---------- |
| 第 $i$ 层的节点数量 | $2^{i-1}$ | $1$ |
| 树的高度 $h$ 的叶节点数量 | $2^h$ | $1$ |
| 树的高度 $h$ 的节点总数 | $2^{h+1} - 1$ | $h + 1$ |
| 树的节点总数 $n$ 的高度 | $\log_2 (n+1) - 1$ | $n - 1$ |
</div>
| 高度 $h$ 的叶节点数量 | $2^h$ | $1$ |
| 高度 $h$ 的节点总数 | $2^{h+1} - 1$ | $h + 1$ |
| 节点总数 $n$ 的高度 | $\log_2 (n+1) - 1$ | $n - 1$ |