How to construct a random connected graph of given size

I have no idea how to make the graph connected. The output should be an adjacency matrix of given size n (number of nodes), and the matrix is a 2d array. The graph is unweighted and undirected. It'll be helpful if there's any code implementation (Java preferred, C/C++ would be great too)...

Read More »

By: StackOverFlow - 7 days ago

Related Posts