This application computes the strongly connected components of a directed graph using Kosaraju's two-pass algorithm.
See test_graph.txt
for a sample input. Each line on the input file represents one edge of the graph.
Nodes are labeled by integers, and each edge consists of the label of the tail node followed by the label
of the head node.
The sample graph in test_graph.txt
is depicted below, with the strongly connected components circled in red.
Run go run main.go <GRAPH_FILE.txt>
. The output will be the population of the top five most populous
strongly connected components.