This commit is contained in:
krahets
2023-10-24 15:44:05 +08:00
parent 365620ac22
commit aae934ba24
10 changed files with 40 additions and 51 deletions

View File

@ -18,10 +18,10 @@ comments: true
<div class="center-table" markdown>
| 方法名 | 描述 | 时间复杂度 |
| ----------- | -------------- | ---------- |
| pushFirst() | 将元素添加至队首 | $O(1)$ |
| pushLast() | 将元素添加至队尾 | $O(1)$ |
| 方法名 | 描述 | 时间复杂度 |
| ----------- | ---------------- | ---------- |
| pushFirst() | 将元素添加至队首 | $O(1)$ |
| pushLast() | 将元素添加至队尾 | $O(1)$ |
| popFirst() | 删除队首元素 | $O(1)$ |
| popLast() | 删除队尾元素 | $O(1)$ |
| peekFirst() | 访问队首元素 | $O(1)$ |