Which concept is defined as follows: a graph traversal algorithm that explores all neighbors at the current depth before moving deeper?
- A. Depth-first search (DFS)
- B. Breadth-first search (BFS) ✓
- C. Big O notation
- D. Divide and conquer
Correct answer
B. Breadth-first search (BFS)
Explanation
Breadth-first search (BFS) refers to a graph traversal algorithm that explores all neighbors at the current depth before moving deeper.