warming up your workspace

Topological sort

Applies to: general

A topological sort orders the nodes of a directed acyclic graph so every edge points forward, which is how you sequence tasks with dependencies. It exists only when the graph has no cycle.

edges: a->b, a->c, b->d, c->d   ->   a, b, c, d

See also: graph, depth-first-search