Exam-style question
Try this first
Which application matches breadth-first search as specified for an unweighted graph?.
- A.Finding a shortest path
- B.Navigating a maze by following one branch as far as possible
- C.Sorting vertices into alphabetical order
- D.Counting the number of letters in vertex names
Model answer
What a good answer should say
- Finding a shortest path
Explanation
Why this works
Breadth-first search can find the shortest path in an unweighted graph. Navigating a maze by exploring one route deeply is a typical application of depth-first search.
Common mistake
No common mistake is linked to this question yet.
