PATHLIGHT
LESSON 08 OF 08Topological sort
0% learnt
COURSE SCHEDULE · KAHN’S TOPOLOGICAL SORT

Which courses can enter the queue first?

A and B have no incoming prerequisite edges. Every other course is still blocked.

RULE TO APPLYOnly indegree 0 is ready; removing a course decreases the indegree of what it unlocks.
LIVE ALGORITHM STATEThe badge on each course is its remaining prerequisite count.
A0B0C2D1E1
READY QUEUE · INDEGREE 0
AB