Tree Properties & Traversals

Your answer
Answer & solution
Answer: D (no official key was published)
1. Breadth-first search uses a queue to visit the root, then all children, then their children, and so on. This is precisely level order, D; depth-first traversals do not generally preserve depth order.
2. Teaching check: Begin with just the root in a queue. Repeatedly dequeue a vertex and enqueue its children. Children of a depth-d vertex are enqueued behind all remaining depth-d vertices, so no depth-(d+1) vertex is processed prematurely.