What is 'Level-order' traversal?

What is 'Level-order' traversal?

Approach: Describe visiting nodes level by level.

A tree traversal where nodes are visited level by level from left to right. This is typically implemented using a queue (BFS).

Follow-up: How do you separate levels in the output?

Key concepts: bfs, queue.