Practice mode Data Structures

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.