1.

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 AI'd like to ask this question from Directed Acyclic Graph in portion Graph of Data Structures & Algorithms II had been asked this question in exam.

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.



Discussion

No Comment Found

Related InterviewSolutions