Back to all patterns
Topological Sort / Cycle Detection
1 problems • Practice on LeetCode to earn credits
About This Pattern
Master the Topological Sort / Cycle Detection pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.
Medium (1)
Course Schedule
Determine if you can finish all courses given prerequisites (cycle detection).
Key Signals:
Build graphDetect cycle with DFS statesOr use in-degree