Linear Structures30 min readCompleted
Stacks and queues
Overview
Presents two restricted structures that appear throughout computing.
A stack allows adding and removing only at one end, giving last-in first-out order. It models function calls, undo history and depth-first exploration.
A queue allows adding at one end and removing at the other, giving first-in first-out order. It models task scheduling and breadth-first exploration.