Best algorithm for detecting cycles in a directed graph [closed]

Tarjan’s strongly connected components algorithm has O(|E| + |V|) time complexity.

For other algorithms, see Strongly connected components on Wikipedia.

Leave a Comment