mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 06:56:06 +00:00
Revisit the English version (#1885)
* Update giscus scroller. * Refine English docs and landing page * Sync the headings. * Update landing pages. * Update the avatar * Update Acknowledgements * Update landing pages. * Update contributors. * Update * Fix the formula formatting. * Fix the glossary. * Chapter 6. Hashing * Remove Chinese chars. * Fix headings. * Update giscus themes. * fallback to default giscus theme to solve 429 many requests error. * Add borders for callouts. * docs: sync character encoding translations * Update landing page media layout and i18n
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Deque
|
||||
|
||||
In a queue, we can only remove elements from the front or add elements at the rear. As shown in the figure below, a <u>double-ended queue (deque)</u> provides greater flexibility, allowing the addition or removal of elements at both the front and rear.
|
||||
In a queue, we can only remove elements from the front or add elements at the rear. As shown in the figure below, a <u>double-ended queue (deque)</u> provides greater flexibility, allowing elements to be added or removed at both the front and the rear.
|
||||
|
||||

|
||||
|
||||
@@ -19,7 +19,7 @@ The common operations on a deque are shown in the table below. The specific meth
|
||||
| `peek_first()` | Access front element | $O(1)$ |
|
||||
| `peek_last()` | Access rear element | $O(1)$ |
|
||||
|
||||
Similarly, we can directly use the deque classes already implemented in programming languages:
|
||||
Similarly, we can directly use the deque classes provided by the programming language:
|
||||
|
||||
=== "Python"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user