Takes a Directed Acyclic Graph* and returns an array of the nodes where each node appears before all the nodes it points to.
Directed Acyclic Graph →* directed graph with no cycles
Have all nodes in straight line pointing right
Topological sort is not unique ( can have more one topological ordering )
Used to perform a topological sort on a directed acyclic graph
vertex 4 has 3 incoming edges and 3 outgoing edges , so indegree is 3 and outdegree is 3.
vertex 7 has 2 indegree and 1 outdegree :)
What is topological sort?arrow-up-right
Last updated 10 months ago