Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2017 – May | Question 17
  • Last Updated : 20 Mar, 2018

Which of the following data structure is useful in traversing a given graph by breadth first search?
(A) Stack
(B) List
(C) Queue
(D) None of the above.


Answer: (C)

Explanation: BFS performs level-order traversal which can be fairly done using a queue. A queue uses FIFO ordering and the nodes that we enqueue first are explored first maintaining the order of traversal.

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :