Topological Sort

The topological sort algorithm is used for a lot of things, particularly scheduling. Its input is a directed acyclic graph (which can be drawn by taking a simple undirected graph and giving each edge a direction). The output of the algorithm will be an ordering of the nodes in terms of their "importance". This is important in things such as job scheduling where certain jobs must be completed before others. Performing a topological sort on the set of jobs can give an overall ordering of when to start each job.

your browser does not support the canvas tag