Introduction
In a directed acyclic graph (DAG), a topological sort is a linear ordering of the vertices such that for every directed edge, the vertex u comes before v in the ordering. This ordering can be used to find the shortest path between two ve...