Next: 1.5.2 Using the operand Up: 1.5 Stacks Previous: 1.5 Stacks Contents Index

## 1.5.1 Using stacks as queues

Stacks are implemented such that access to the top or bottom is very efficient, and efficiency decreases linearly, the farther into the stack an operation has to iterate. Since pushing and popping is efficient for both ends of stacks, this means that stacks are suitable for use as queues.