← Graphs Quiz: all 8 questions
Graphs Quiz · Question 5 of 8
In Kahn's algorithm (topological sort), which nodes enter the queue first?
In Kahn's algorithm (topological sort), which nodes enter the queue first?
- A.Nodes with in-degree 0
- B.Nodes with the most edges
- C.The node with the smallest value
- D.All nodes at once
Answer & explanation
Correct answer: Nodes with in-degree 0
In-degree 0 means no remaining prerequisites, so they can be taken right away.
Can you get the rest right without peeking?
Take the timed Graphs Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →