Using depth first search to test graph connectivity in C++

Problem description Given a directed or undirected graph, determine whether it is connected or not. Specifically is it possible for any pair of nodes to communicate with each other? This brief post reproduces this web page whereby the problem was to determine whether a graph is strongly connected or not. I use a slight modification …

Continue reading ‘Using depth first search to test graph connectivity in C++’ »