previous | start | next

Topological Sort

This algorithm is applicable to a directed graph whose edges represent dependencies. It outputs the vertices in an order that respects the dependencies.

A directed graph

What node or nodes have no prerequisites?

These are the values that can be output first in topological sort order.



previous | start | next