Which graph traversal guarantees visiting all vertices at the current depth before moving to the next level?

14 views
  • Depth-First Search (DFS)
  • Breadth-First Search (BFS) (Correct Answer)
  • Dijkstra’s Algorithm
  • Bellman-Ford Algorithm

Explanation

BFS uses a queue to explore all vertices at the current depth level before moving deeper, making it ideal for shortest-path in unweighted graphs. DFS uses a stack/recursion and goes deep first.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs