← Quiz: Topological Sort: all 15 questions
Quiz: Topological Sort · Question 1 of 15
A topological order of a directed graph exists if and only if the graph:
A topological order of a directed graph exists if and only if the graph:
- A.is connected
- B.has no node with in-degree 0
- C.has no directed cycle
- D.is a tree
Answer & explanation
Correct answer: has no directed cycle
In a cycle every node waits for another node in the same cycle, so none can come first.
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 →