Write an algorithm that prints the minimum spanning tree of a graph. At the end, print the weight of the spanning tree. A suggested report format is shown in the following example.
Source Vertex
|
To Vertex
|
Weight
|
A
|
B
|
2
|
A
|
C
|
4
|
B
|
D
|
3
|
D
|
E
|
1
|
Total weight of spanning tree: 10
|