Algorithm to check if directed graph is strongly connected
I need to check if a directed graph is strongly connected , or, in other words, if all nodes can be reached by any other node (not necessarily through direct edge). One way of doing this is running a DFS and BFS on every node and see all others are still reachable. Is there a better approach to do that? Tarjan's strongly connected components algorithm (or Gabow's variation) will of course suffice; if there's only one strongly connected component, then the graph is strongly connected. Both are linear time. As with a normal depth first search, you track the status of each node: new, seen but