Back
Topological Sort
Question 1 of 128% Complete
Medium
Match topo technique to clue:
Problems
1
Find cycle in directed graph
2
Course Schedule (is possible?)
3
DFS cycle detection
4
Course order
Patterns
A
Non-empty nodes with indegree>0 at end (Kahn)
B
Colors or recursion stack
C
Produce Kahn/DFS order
D
Detect no cycle via Kahn