C++ code: Different Graph connected

profileyxpan1996

Using VS and C++. I will provide a Source file which is a Graph class. The requirement is to add 4 methods:

   

· bool isStronglyConnected() - returns true if the graph instance is strongly connected.

· bool isWeaklyConnected() - returns true if the graph instance is weakly connected.

· int largestWeaklyConnectedSubGraph() - returns the number of vertices in the weakly connected sub-graph with the largest number of vertices. In the case of a graph that is at least weakly connected, this should return the number of vertices in the graph.

· int largestStronglyConnectedSubGraph() - returns the number of vertices in the STRONGLY connected sub-graph with the largest number of vertices. In the case of a graph that is already strongly connected, this should return the number of vertices in the graph. This is MUCH more difficult than the the weakly connected sub-graph method.

 

More detail of requirement will be in the requirement.docx 

  • 9 years ago
  • 70
Answer(0)