Algorithms | Graph Traversals | Question 9

Last Updated :
Discuss
Comments

Which of the following condition is sufficient to detect cycle in a directed graph?

There is an edge from currently being visited node to an already visited node.

There is an edge from currently being visited node to an ancestor of currently visited node in DFS forest.

Every node is seen twice in DFS.

None of the above

Share your thoughts in the comments