Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MST Algorithms to the Algorithms_and_Data_Structures folder #481 #593

Closed
wants to merge 5 commits into from

Conversation

shashmitha46
Copy link
Contributor

@shashmitha46 shashmitha46 commented Oct 14, 2024

Pull Request for PyVerse 💡

Requesting to submit a pull request to the PyVerse repository.


Issue Title

[Code Addition Request]: Add MST Algorithms

  • I have provided the issue title.

Info about the Related Issue

What’s the goal of the project?

The goal of the project is to enhance the repository's graph algorithms section by implementing optimized versions of Prim's and Kruskal's algorithms to find the Minimum Spanning Tree (MST) in an undirected, weighted graph. These implementations will improve performance by using a priority queue in Prim’s algorithm and a disjoint set in Kruskal’s for cycle detection.

Describe the aim of the project.

The aim is to provide efficient and well-documented implementations of MST algorithms, ensuring that they handle edge cases (like disconnected graphs) and include unit tests for reliability. This will strengthen the graph algorithms section of the repository.

  • I have described the aim of the project.

Name

Please mention your name.
Enter your name here.
Shashmitha V

  • I have provided my name.

GitHub ID

Please mention your GitHub ID.
Enter your GitHub ID here.
https://github.com/shashmitha46

  • I have provided my GitHub ID.

Email ID

Please mention your email ID for further communication.
Enter your email ID here.
[email protected]

  • I have provided my email ID.

Identify Yourself

Mention in which program you are contributing (e.g., WoB, GSSOC, SSOC, SWOC).
Enter your participant role here.

  • I have mentioned my participant role.

Closes

Enter the issue number that will be closed through this PR.
*Closes: #481 *

  • I have provided the issue number.

Describe the Add-ons or Changes You've Made

Give a clear description of what you have added or modified.
Describe your changes here.
Added 3 MST algorithms

  1. prim's algorithm
  2. kruskal's algorithm
  3. using scipy
  • I have described my changes.

Type of Change

Select the type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Describe how your changes have been tested.
Describe your testing process here.

The changes have been tested using unit tests that cover various scenarios, including connected graphs, disconnected graphs, and edge cases like graphs with no edges or multiple minimum spanning trees. The tests ensure that both Prim’s and Kruskal’s algorithms correctly find the Minimum Spanning Tree and handle edge cases without errors.

  • I have described my testing process.

Checklist

Please confirm the following:

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Copy link

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

@github-actions github-actions bot requested a review from UTSAVS26 October 14, 2024 18:03
@UTSAVS26 UTSAVS26 added Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. Status: Review Ongoing PR is currently under review and awaiting feedback from reviewers. level1 gssoc-ext hacktoberfest labels Oct 15, 2024
@ruhi47
Copy link
Collaborator

ruhi47 commented Oct 23, 2024

Assign me if no one is reviewing this @UTSAVS26

@UTSAVS26 UTSAVS26 requested a review from ruhi47 October 24, 2024 02:20
@UTSAVS26
Copy link
Owner

Assign me if no one is reviewing this @UTSAVS26

Done

@TheChaoticor TheChaoticor added copied-project The project is copied from someone else and removed Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. copied-project The project is copied from someone else labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copied-project The project is copied from someone else gssoc-ext hacktoberfest level1 Status: Review Ongoing PR is currently under review and awaiting feedback from reviewers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Code Addition Request]: Add MST Algorithms
4 participants