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

@ -40,8 +40,7 @@
- 将当前树在 `inorder` 中的索引区间记为 $[l, r]$ 。
如下表所示,通过以上变量即可表示根节点在 `preorder` 中的索引,以及子树在 `inorder` 中的索引区间。
<div class="center-table" markdown>
<p align="center"> 表:根节点和子树在前序和中序遍历中的索引 </p>
| | 根节点在 `preorder` 中的索引 | 子树在 `inorder` 中的索引区间 |
| ------ | -------------------------------- | ----------------------------- |
@ -49,8 +48,6 @@
| 左子树 | $i + 1$ | $[l, m-1]$ |
| 右子树 | $i + 1 + (m - l)$ | $[m+1, r]$ |
</div>
请注意,右子树根节点索引中的 $(m-l)$ 的含义是“左子树的节点数量”,建议配合下图理解。
![根节点和左右子树的索引区间表示](build_binary_tree_problem.assets/build_tree_division_pointers.png)