[PR #1478] [CLOSED] kruskal.c #2073

Open
opened 2026-01-29 15:28:27 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1478
Author: @xoxo444
Created: 8/1/2025
Status: Closed

Base: masterHead: patch-1


📝 Commits (1)

📊 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.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1478 **Author:** [@xoxo444](https://github.com/xoxo444) **Created:** 8/1/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`2960af0`](https://github.com/TheAlgorithms/C/commit/2960af07296a80afb69957a63e1fe992d46573e0) kruskal.c ### 📊 Changes **1 file changed** (+92 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `greedy_approach/kruskal.c` (+92 -0) </details> ### 📄 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:28:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2073