Directed Graph Acyclicity Checker
The system implements two graph algorithms from scratch: Sink Elimination using Kahn’s Algorithm to determine whether a directed graph is acyclic, and DFS cycle detection to identify and output the exact cycle path when one exists. It uses an adjacency list representation, a reverse adjacency list for efficient predecessor lookup during sink removal, and defensive copies to preserve graph integrity across both algorithms, achieving optimal O(V + E) time complexity.