Created a Directed Cycle to determine if there is a cycle and a Topological sort