Advertisements
Advertisements
Question
The data structure required for Breadth First Traversal on a graph is ______.
Options
Stack
Array
Queue
Thee
MCQ
Fill in the Blanks
Advertisements
Solution
The data structure required for Breadth First Traversal on a graph is Queue.
Explanation:
In Breadth First Search Traversal, BFS, starting vertex is first taken and adjacent vertices which are unvisited are also taken. Again, the first vertex which was added as an unvisited adjacent vertex list will be considered to add further unvisited vertices of the graph. To get the first unvisited vertex we need to follow First In First OUT principle. Queue uses FIFO principle.
shaalaa.com
Is there an error in this question or solution?
