logo

Question detail

A breadth-first search starts at A. The neighbours of each vertex are considered in the order shown: A: B, C; B: D; C: E; D: none; E: none. In what order are the vertices visited?

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Graph-traversal

Exam-style question

Try this first

A breadth-first search starts at A. The neighbours of each vertex are considered in the order shown: A: B, C; B: D; C: E; D: none; E: none. In what order are the vertices visited?.

  1. A.A, C, B, E, D
  2. B.A, B, C, D, E
  3. C.A, B, D, C, E
  4. D.B, C, A, D, E

Model answer

What a good answer should say

  • A, B, C, D, E

Explanation

Why this works

Breadth-first search visits all vertices one edge away from A before visiting vertices two edges away. It visits A, then B and C, followed by D and E.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.