← Quiz: Topological Sort: all 15 questions
Quiz: Topological Sort · Question 7 of 15
In the DFS method, the topological order is:
In the DFS method, the topological order is:
- A.the order in which nodes are first visited
- B.the reverse of the order in which nodes finish
- C.the finishing order, not reversed
- D.the BFS level order
Answer & explanation
Correct answer: the reverse of the order in which nodes finish
A node finishes after all nodes that depend on it, so reversing the finishing order puts it before them.
Can you get the rest right without peeking?
Take the timed Quiz: Topological Sort quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →