logo

AQA A-Level Computer Science practice

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 first, then check the answer and practise the same topic again.

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

Answer and explanation

Concise answer

A, B, C, D, E

Why this is correct

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.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions