In a directed acyclic graph (DAG), which algorithm can be used to determine a linear ordering of vertices?

14 views
  • Dijkstra’s Algorithm
  • Kruskal’s Algorithm
  • Topological Sorting (Correct Answer)
  • Prim’s Algorithm

Explanation

Topological sorting provides a linear ordering of vertices in a DAG such that for every edge u → v, u appears before v. Dijkstra, Kruskal, and Prim are for shortest paths or MST, not topological order.

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