0

This question was already asked here. But how does it work with a disconnected Graph. Could someone please explain how the Kosaraju's algorithm solve the problem or maybe give another way to solve this.

Ritch
  • 1

1 Answers1

0

If the graph is disconnected, then the set of nodes from which all other nodes in the graph is reachable is empty. You could just run Kosaraju's algorithm on each connected component though.

Albert
  • 540
  • 4
  • 9