What sequence would the BFS traversal of the given graph yield?

Category: QuestionsWhat sequence would the BFS traversal of the given graph yield?
Editor">Editor Staff asked 2 months ago

What sequence would the BFS traversal of the given graph yield?
 
(a) A F D B C E
 
(b) C B A F E D
 
(c) A B D C E F
 
(d) E F D C B A
 
I’d like to ask this question from Directed Acyclic Graph in portion Graph of Data Structures & Algorithms I
 
I had been asked this question in exam.

1 Answers
Editor">Editor Staff answered 2 months ago

Right answer is (c) A B D C E F
 
The best I can explain: In BFS nodes gets explored and then the neighbors of the current node gets explored, before moving on to the next levels.