level-order traversal

Visiting a tree level by level from the root down, left to right within each level, using a queue.

In more detail

Dequeue a node, visit it and enqueue its children; the queue ensures nearer nodes come out first. It is breadth-first search applied to a tree, and the course uses it to print B-tree keys level by level.

Related terms

Taught in

References