Update the book based on the revised second edition (#1014)

* Revised the book

* Update the book with the second revised edition

* Revise base on the manuscript of the first edition
This commit is contained in:
Yudong Jin
2023-12-28 18:06:09 +08:00
committed by GitHub
parent 19dde675df
commit f68bbb0d59
261 changed files with 643 additions and 647 deletions

View File

@@ -10,14 +10,14 @@
<p align="center"> 表 <id> &nbsp; 双向队列操作效率 </p>
| 方法名 | 描述 | 时间复杂度 |
| ----------- | ---------------- | ---------- |
| pushFirst() | 将元素添加至队首 | $O(1)$ |
| pushLast() | 将元素添加至队尾 | $O(1)$ |
| popFirst() | 删除队首元素 | $O(1)$ |
| popLast() | 删除队尾元素 | $O(1)$ |
| peekFirst() | 访问队首元素 | $O(1)$ |
| peekLast() | 访问队尾元素 | $O(1)$ |
| 方法名 | 描述 | 时间复杂度 |
| ------------- | ---------------- | ---------- |
| `pushFirst()` | 将元素添加至队首 | $O(1)$ |
| `pushLast()` | 将元素添加至队尾 | $O(1)$ |
| `popFirst()` | 删除队首元素 | $O(1)$ |
| `popLast()` | 删除队尾元素 | $O(1)$ |
| `peekFirst()` | 访问队首元素 | $O(1)$ |
| `peekLast()` | 访问队尾元素 | $O(1)$ |
同样地,我们可以直接使用编程语言中已实现的双向队列类: