Correct Answer (Detailed Explanation is Below)
B.
Queue
Detailed Explanation
Breadth-First Search (BFS) generally uses a
Queue to visit vertices level by level. Starting from a source vertex, BFS visits its immediate neighbors first and then proceeds to the next level. A queue ensures that vertices are processed in the same order in which they are discovered. BFS is useful for finding the shortest path in an
unweighted graph. In contrast,
Depth-First Search (DFS) commonly uses a stack or recursion.