DSA Visualized
← All topics
stacks

Stacks & Queues

Two structures that differ by one decision.

01

Stack

Last in, first out. The undo button of data structures.

play_circle
02

Queue

First in, first out. Fairness, as a data structure.

play_circle
03

Deque

A queue open at both ends — a stack and a queue in one structure.

play_circle
04

Circular Queue

A queue in a fixed array that never shuffles — the pointers go round instead.

play_circle
05

Monotonic Stack

A stack kept in order — so one new value can answer many old questions at once.

play_circle