Which of the following best describes how the Breadth First Search (BFS)…
2025
Which of the following best describes how the Breadth First Search (BFS) algorithm traverses a graph?
Answer: C. It visits all nodes at the current level before moving on to nodes at the next level.
- A.
It explores nodes in no particular order.
- B.
It goes as deep as possible along each branch before backtracking.
- C.
It visits all nodes at the current level before moving on to nodes at the next level.
- D.
It always selects the edge with the lowest cost first.
Attempted by 382 students.
Show answer & explanation
Correct answer: C
Loading lesson…