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

@ -11,8 +11,7 @@
- **添加元素**:仅需将元素添加至数组(链表)的尾部即可,使用 $O(1)$ 时间。
- **查询元素**:由于数组(链表)是乱序的,因此需要遍历其中的所有元素,使用 $O(n)$ 时间。
- **删除元素**:需要先查询到元素,再从数组中删除,使用 $O(n)$ 时间。
<div class="center-table" markdown>
<p align="center"> 表:元素查询效率对比 </p>
| | 数组 | 链表 | 哈希表 |
| -------- | ------ | ------ | ------ |
@ -20,8 +19,6 @@
| 添加元素 | $O(1)$ | $O(1)$ | $O(1)$ |
| 删除元素 | $O(n)$ | $O(n)$ | $O(1)$ |
</div>
观察发现,**在哈希表中进行增删查改的时间复杂度都是 $O(1)$** ,非常高效。
## 哈希表常用操作