How does a Depth-First Search (DFS) provide a topological sort ?
A) By the order of the nodes finishing times
B) Using random nodes selection order
C) Reversing the order of nodes finishing times
D) By visiting nodes in the alphabetical order
E) None of the above
Original idea by: Cinthia Kleiner
A bit on the easy side, but explores an important concept. I'll take it.
ResponderExcluir