Trivia ForgePlay free →

What type of graph must be used to allow for a topological sort?

Show answer

Directed Acyclic Graph (DAG)

A topological sort is a linear ordering of vertices such that for every directed edge (u, v), u comes before v. This is only possible if the graph has no directed cycles.

Also asked as:
  • A topological sort is only possible on what specific type of graph?

Would you remember this in 6 months?

Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.

Turn on Algorithms practice →

More Algorithms trivia

See all 83 →