Hi there! I need help with this C++ Program. If you have answered this question before or if you are going to copy-paste from other similar solution, please don't answer again! Thank you! QUESTION: Using C++, create a program with two functionalities: [1] Generate a Minimum Spaning Tree (MST) for strings with Prim's Algorithm. This method must have two input parameters: the origin node ("string start") and a Graph class for the MST (the main object Graph g, from which the MST will be generated, is the one who will call the method using g.PrimAlgo(string start, Graph agm)). This method should be implemented using a priority_queue with a pair, i.e. typedef pair p, priority_queue , greater > pq. The edges must be in a map. Consider all auxiliar methods (get edge weight) already implemented. If there is a tie between the weight of two edges (u1,v1) and (u2,v2), choose the one in which the value of u is the lowest.
Hi there! I need help with this C++ Program.
If you have answered this question before or if you are going to copy-paste from other similar solution, please don't answer again! Thank you!
QUESTION: Using C++, create a program with two functionalities:
[1] Generate a Minimum Spaning Tree (MST) for strings with Prim's
[2] Recursively print the MST generated by Prim's Algorithm method. This tree must be represented using adjacency list.
Step by step
Solved in 3 steps with 1 images