an array of directed edges where each edge contains two vertex indices with the direction going from index 0 towards 1
an ordering of the vertices from the edges provided, or undefined if a cycle is detected.
Perform a topological sort on a directed acyclic graph. If a cycle exists, this method will return undefined.
an array of directed edges where each edge contains two vertex indices with the direction going from index 0 towards 1