Topological sort (Kahn)
Order tasks so every arrow points forward; if that is impossible, there is a cycle.
Directed edges101-201, 101-202, 150-202, 201-301, 202-301, 202-310, 301-401, 310-401
Count incoming edges for each node (shown after the dot). Ready now: 101, 150.
- compare
- swap or write
- settled
Space play · ← → step · Home End jump · drag the strip to scrub