Which of the following data structures is used to implement a Breadth-First…
2025
Which of the following data structures is used to implement a Breadth-First Search (BFS) algorithm ?
Answer: B. Queue — BFS uses a Queue data structure because it follows FIFO order to explore nodes level by level. This ensures all neighbors at current depth are processed…
- A.
Stack
- B.
Queue
- C.
Tree
- D.
Array
Attempted by 777 students.
Show answer & explanation
Correct answer: B
BFS uses a Queue data structure because it follows FIFO order to explore nodes level by level. This ensures all neighbors at current depth are processed before moving deeper.
Loading lesson…