Home > Back-end >  Data structure for a great god help!!!!!!
Data structure for a great god help!!!!!!

Time:11-24

10. For as shown in the weighted undirected graph, using Prim algorithm and Kruskal algorithm (from vertex 0 structure) of the minimum spanning tree is constructed as a result, the demand results in structure on the edge of order list,

CodePudding user response:

Prim order: 0 - & gt; 1 0 - & gt; 1-3 & gt; 2-2 & gt; 5 5 - & gt; 4
Kruskal sequentially: 0 - & gt; 1 0 - & gt; 1-3 & gt; 5-2 & gt; 2-4 & gt; 5

CodePudding user response:

black fertilizer will play a reference 1 floor response:
prim order: 0 - & gt; 1 0 - & gt; 1-3 & gt; 2-2 & gt; 5 5 - & gt; 4
Kruskal sequentially: 0 - & gt; 1 0 - & gt; 1-3 & gt; 5-2 & gt; 2-4 & gt; 5
thank!

CodePudding user response:

black fertilizer will play a reference 1 floor response:
prim order: 0 - & gt; 1 0 - & gt; 1-3 & gt; 2-2 & gt; 5 5 - & gt; 4
Kruskal sequentially: 0 - & gt; 1 0 - & gt; 1-3 & gt; 5-2 & gt; 2-4 & gt; 5
write a chain queue algorithm into the team the enQueue (q, e), and add a comment for each statement, explain the function and role of the statement, this how to do
  • Related