Queues

First-in, first-out collection for scheduling, BFS, and buffering.

Related concepts

TopicDescription
Breadth-First SearchExplore level by level from a starting point, the go-to way to find the shortest path in an unweighted graph.
ArraysOrdered indexable collection for O(1) access by position.
Linked ListsNodes linked by pointers — insert and delete without shifting a contiguous block.
StacksLast-in, first-out collection for undo, parsing, and nested work.
Hash TablesKey-to-value lookup in average O(1) via hashing into buckets.
TreesHierarchical nodes with parent–child links for ordered and nested data.