1.

Which data structure is used in Breadth First Traversal of a graph?(a) Stack(b) Queue(c) Array(d) TreeThe question was asked during an online interview.Origin of the question is Data Structures-Queue topic in section java.util – The Collections Framework of Java

Answer» RIGHT choice is (B) Queue

The EXPLANATION: In Breadth First Traversal of graph the NODES at the same level are ACCESSED in the order of retrieval (i.e FIFO).


Discussion

No Comment Found

Related InterviewSolutions