+1 vote
in Data Structures & Algorithms I by (88.2k points)
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 Answer

+1 vote
by (737k points)
selected by
Best answer
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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.