Graph Theory37 sections · 1633 units
Open in Course

Quiz: Kahn's vs DFS Topological Sort

Knowledge check

Check Your Understanding

You need the lexicographically smallest topological ordering. Which approach should you use?

  1. A.DFS-based topological sort with a stack
  2. B.Either approach works. Just sort the result afterward
  3. C.Kahn's algorithm with a min-heap instead of a regular queue
  4. D.Run both and pick the smaller one
Start the roadmap to answer the quizzes and solve the challenges