Level-Order Traversal
noun
say it: “LEV-ul OR-der truh-VUR-sul” /ˈlɛvəl ˈɔrdɚ trəˈvɝsəl/
A tree walk that visits the root, then every node one step down, then two steps down, and so on, using a queue.
What is a level-order traversal?
A level-order traversal visits the root, then every node at depth 1, then every node at depth 2, and so on, like touring a building floor by floor. A queue keeps the nodes waiting to be visited in order.
In a sentence
- “The org chart screen shows one management level per row, so it uses a level-order traversal.”
Level: Journeyman · More Data Structures terms at this level
Updated