File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ void main()
26
26
}
27
27
}
28
28
29
- printf ("The edges of Minimum Cost Spanning Tree are\n" );
29
+ printf ("\nThe edges of Minimum Cost Spanning Tree are\n" );
30
30
while (ne < n )
31
31
{
32
32
for (i = 1 , min = 999 ; i <= n ; i ++ )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ void get()
10
10
printf ("\nEnter Cost Matrix: \n" );
11
11
for (i = 0 ; i < n ; i ++ )
12
12
{
13
- // printf("\nEnter Elements of Row #: %d\n", i + 1);
13
+ // printf("Enter Elements of Row #: %d\n", i + 1);
14
14
for (j = 0 ; j < n ; j ++ )
15
15
scanf ("%d" , & a [i ][j ]);
16
16
visited [i ] = 0 ;
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ Total cost of spanning tree = 8
211
211
Example 1:
212
212
213
213
``` bash
214
- Kruskal ' s algorithm in C
214
+ Kruskals algorithm in C
215
215
========================
216
216
Enter the no. of vertices: 5
217
217
Enter the cost adjacency matrix:
@@ -220,6 +220,7 @@ Enter the cost adjacency matrix:
220
220
2 3 0 6 5
221
221
0 0 6 0 0
222
222
1 1 5 0 0
223
+
223
224
The edges of Minimum Cost Spanning Tree are
224
225
1 edge (1,2) = 1
225
226
2 edge (1,5) = 1
@@ -230,7 +231,7 @@ Minimum cost = 10
230
231
```
231
232
Example 2:
232
233
``` bash
233
- Kruskal ' s algorithm in C
234
+ Kruskals algorithm in C
234
235
========================
235
236
Enter the no. of vertices: 6
236
237
Enter the cost adjacency matrix:
@@ -240,6 +241,7 @@ Enter the cost adjacency matrix:
240
241
6 0 5 0 0 2
241
242
0 3 6 0 0 6
242
243
0 0 4 2 6 0
244
+
243
245
The edges of Minimum Cost Spanning Tree are
244
246
1 edge (1,3) = 1
245
247
2 edge (4,6) = 2
@@ -277,7 +279,6 @@ Path= 4<-2<-3<-0
277
279
``` bash
278
280
Enter No.of Cities: 6
279
281
Enter Cost Matrix:
280
-
281
282
Enter Elements of Row # : 1
282
283
99 10 15 20 99 8
283
284
Enter Elements of Row # : 2
You can’t perform that action at this time.
0 commit comments