mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-14 21:46:11 +00:00
[PR #1478] [CLOSED] kruskal.c #2073
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/1478
Author: @xoxo444
Created: 8/1/2025
Status: ❌ Closed
Base:
master← Head:patch-1📝 Commits (1)
2960af0kruskal.c📊 Changes
1 file changed (+92 additions, -0 deletions)
View changed files
➕
greedy_approach/kruskal.c(+92 -0)📄 Description
Added Kruskal's Algorithm in C
Implemented Kruskal’s Algorithm using Union-Find (Disjoint Set).
Takes user input, sorts edges, builds MST, and prints total weight.
File: kruskal.c
Sample Input:
4 5
0 1 10
0 2 6
0 3 5
1 3 15
2 3 4
Sample Output:
Edges in Minimum Spanning Tree:
2 - 3 : 4
0 - 3 : 5
0 - 1 : 10
Total Weight of MST: 19
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.