🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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:

  1. A.is connected
  2. B.has no node with in-degree 0
  3. C.has no directed cycle
  4. 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 →