For which kind of graph does a topological ordering exist?
Correct answer C. A directed acyclic graph (DAG)
Explanation
A topological order lists vertices so that every directed edge goes from earlier to later. If the graph contains a directed cycle, some vertex in that cycle would have to come before itself, which is impossible, so the graph must be acyclic. Undirected edges have no direction to respect. Typical uses include scheduling tasks with prerequisites and resolving build dependencies.
Answer checked How we write and check questions
Discussion