Home »
MCQs »
Algorithms MCQs
Which data structure is primarily used in Breadth-First Search (BFS) to keep track of the vertices to be visited?
16. Which data structure is primarily used in Breadth-First Search (BFS) to keep track of the vertices to be visited?
- Stack
- Queue
- Priority Queue
- Linked List
Answer
The correct answer is: B) Queue
Explanation
BFS uses a queue data structure to maintain the order in which nodes are to be visited.