:PROPERTIES:
:ID: a69c361e-b8fb-4a93-a456-61b53360d2a7
:mtime: 20231026072623
:ctime: 20231026072622
:END:
#+title: topological sort of a graph
#+filetags: :public:project:
* Definition of a topological ordering
Given a [[id:80095df3-22a2-4a89-9968-c1734c94c219][directed graph]] $G$, the topological ordering
is a list of the vertices of $G$ such that if
there exists an arrow from $u$ to $v$, then
$u$ comes before $v$ in the list.
* Algorithm to solve topological ordering