Question: WRITE IN C++ : The file DirectedGraph.cpp contains the code for defining the vertices of a directed graph. Use this file to write a program

WRITE IN C++ :

 WRITE IN C++ : The file DirectedGraph.cpp contains the code for

The file DirectedGraph.cpp contains the code for defining the vertices of a directed graph. Use this file to write a program which calculates the average ASCll value of all the characters in the graph (sum all the ASCll values of the vertices in the graph, and divide them by the number of vertices in the graph). Put the weights between the vertices to be the differences (in absolute value) between the ASCII code of the starting vertex and the average ASCll value. If a character is repeated, it should not be included in the graph. From the thus obtained directed graph create a minimum spanning tree according to Dijkstra's algorithm that starts from the vertex with the highest ASCll value in the graph. Print the tree. Example

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!