Visualize an algorithm
Every entry below runs on the same deterministic execution engine: generate all steps up front, then step forwards, backwards and through the code with the exact state each moment produced.
Stacks & Queues
5 visualizationsStack: Push & Pop
beginnerLast in, first out — the model behind undo, nesting and DFS.
O(1)O(n) space
Queue: Enqueue & Dequeue
beginnerFirst in, first out — arrivals leave in the order they came.
O(1)O(n) space
Circular Queue
intermediateA ring buffer that reuses emptied slots instead of wasting them.
O(1)O(capacity) space
Stack using Queues
advancedSimulate LIFO by reversing a FIFO queue on every push.
O(n)O(n) space
Queue using Stacks
advancedTwo stacks reverse an arrival order back into FIFO.
O(1)O(n) space
Not sure where to start?
Follow the guided paths — beginner, intermediate and advanced — in order.