Using Tarjan's algorithm, returns a range of strongly connected
components (SCCs). Each SCC consists of a list of vertices that are
strongly connected. The SCCs are listed in reverse topological order.
Time complexity: O(|v| + |E|)
By filtering for SCCs that consist of more than 1 vertex, we can find and
display all the cycles in a graph.
Using Tarjan's algorithm, returns a range of strongly connected components (SCCs). Each SCC consists of a list of vertices that are strongly connected. The SCCs are listed in reverse topological order.
Time complexity: O(|v| + |E|)
By filtering for SCCs that consist of more than 1 vertex, we can find and display all the cycles in a graph.