1. Engineering
  2. Computer Science
  3. can run in dev c the result following the same...

Question: can run in dev c the result following the same...

Question details

Write a C/C++ program that allows the user to input a weighted undirected graph and then configure a minimum cost spanning tree on it using Sollins algorithm. Youll get no point if you dont implement the system with Sollins algorithm) Input The input consists of several lines. The first line contains an integer number N(<100) indicating the number of the edges of the graph. The following N lines indicate the edges. Each of these N lines consists of three integer numbers, representing with the two endpoints and the weight of the edge, respectively. Output Print out each of the edges of the minimum cost spanning tree configured on the input graph, representing with the two endpoints and the weigh of the edge Sample Input 0 1 28 05 10 12 16 1 6 14 2 3 12 3 4 22 3618 45 25 4 624 0 14 25 18/12 22 (3 Sample Output 1 2 16 1614 2 3 12 3 422 45 25 05 10 16 25 12

Can run in Dev C++
The result following the same input and output

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution