mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-27 04:26:30 +08:00
21 lines
582 B
Markdown
21 lines
582 B
Markdown
---
|
|
comments: true
|
|
icon: material/stack-overflow
|
|
---
|
|
|
|
# Chapter 5. Stack and queue
|
|
|
|
![Stack and queue](../assets/covers/chapter_stack_and_queue.jpg){ class="cover-image" }
|
|
|
|
!!! abstract
|
|
|
|
A stack is like cats placed on top of each other, while a queue is like cats lined up one by one.
|
|
|
|
They represent the logical relationships of Last-In-First-Out (LIFO) and First-In-First-Out (FIFO), respectively.
|
|
|
|
## Chapter contents
|
|
|
|
- [5.1 Stack](stack.md)
|
|
- [5.2 Queue](queue.md)
|
|
- [5.3 Double-ended queue](deque.md)
|
|
- [5.4 Summary](summary.md)
|