Skip to content

Conversation

@shimmer12
Copy link
Contributor

Implemented Kruskal's algorithm to find the Minimum Spanning Tree (MST) of a connected, weighted, undirected graph.

Utilizes Disjoint Set Union (Union–Find) with path compression and union by rank for efficient edge merging.

Accepts edge list input (u, v, w) and number of vertices n.

Returns both the total weight and the edges included in the MST.

Added a simple example demonstrating usage with a 4-node graph.

Written in base R, with no external dependencies, consistent with repository standards.

@shimmer12 shimmer12 requested a review from siriak as a code owner October 11, 2025 21:09
Copilot AI review requested due to automatic review settings October 11, 2025 21:09
@shimmer12 shimmer12 requested a review from acylam as a code owner October 11, 2025 21:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Kruskal's algorithm for finding Minimum Spanning Trees (MST) in weighted undirected graphs. The implementation uses a Disjoint Set Union data structure with path compression and union by rank optimization for efficient cycle detection.

Key changes:

  • Adds complete MST algorithm with Union-Find data structure
  • Includes comprehensive example demonstrating usage on a 4-vertex graph
  • Follows repository standards with base R implementation and no external dependencies

Copilot AI review requested due to automatic review settings October 11, 2025 21:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings October 11, 2025 21:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 11, 2025
@github-actions
Copy link

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant