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 ?
- A.
Stack
- B.
Queue
- C.
Tree
- D.
Array
Attempted by 243 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.