mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-27 12:12:03 +08:00
10 lines
410 B
Markdown
10 lines
410 B
Markdown
---
|
|
id: queue
|
|
title: Queue
|
|
---
|
|
|
|
## Sample questions
|
|
|
|
- Implement a Queue class from scratch with an existing bug, the bug is that it cannot take more than 5 elements.
|
|
- Implement a Queue using two stacks. You may only use the standard `push()`, `pop()`, and `peek()` operations traditionally available to stacks. You do not need to implement the stack yourself (i.e. an array can be used to simulate a stack).
|