How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference.
There should not be any back edge while doing DFS.Keep track of already visited nodes while doing DFS,if you encounter a edge between current node and existing node,then graph has cycle.