Topological sorting (DAG)

maths
Topological sorting

Suppose we have a DAG $D = (V,E)$ a topological sorting on $D$ is a linear ordering $<$ of $V$ such that for all edges $(x,y) \in E$ we have $x < y$.