Correct answer: A. Depth-first goes as deep as possible before backtracking; breadth-first visits all nodes at the current level first
Explanation
Depth-first traversal goes as deep as possible along a branch before backtracking, while breadth-first visits all nodes at the current depth before moving deeper.
Practise 3 questions on this topic
Take Trees & Graphs — Timed Test (3 questions) — scored instantly, explanation for every question, no login.