Pattern 22: LeetCode Interview Patterns24 sections · 736 units
Open in CourseQuiz: Cycle Detection
Test your understanding
Check Your Understanding
If prerequisites contain a cycle (A needs B, B needs C, C needs A), what should Course Schedule return?
- A.Any valid ordering that ignores the cycle
- B.True - cycles are allowed
- C.The length of the cycle
- D.False - no valid course order exists