Programmers Quickie
Topological Sort
In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. ... Topological sorting has many applications especially in ranking problems such as feedback arc set