**Problem Statement:**
Given the required input arguments, write an efficient algorithm to solve the **Course Schedule (Cycle Detection)** problem. Implement the required logic as specified by standard definitions for this classic algorithmic challenge.
**Hint / Expected Approach:**
Topological sort via DFS (white/gray/black) or Kahn's BFS
**Edge Cases to Consider:**
- (1) No prerequisites
- (2) Self-loop
- (3) Multiple independent cycles