Here's a quick and simple algorithm for topological ordering:
(examples to follow)
(examples to follow)
- Find a node with NO incoming edges, and order it first.
- Delete that node from the graph.
- Repeat.
Definitely helps seeing it being done animated in this way. Well done
ReplyDeleteThis comment has been removed by the author.
ReplyDelete