Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/kruskal algorithm #7068

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

Open
guillermolara01 wants to merge 5 commits into TheAlgorithms:master
base: master
Choose a base branch
Loading
from guillermolara01:feature/kruskal_algorithm

Conversation

@guillermolara01
Copy link

@guillermolara01 guillermolara01 commented Nov 14, 2025

This adds the Kruskal's Minimum Spanning Tree algorithm mentioned in #7067.

Description


Added the Kruskal algorithm and its corresponding unit tests using JUnit.

Implementation

  1. Complete Algorithm implementation
  • Supporting Connected and Disconnected graphs.
  • Time Complexity: O(e log e)
  1. Encapsulation
  2. JUnit Tests
  • For the expected behaviour

  • For edge cases

  • I have read CONTRIBUTING.md.

  • This pull request is all my own work -- I have not plagiarized it.

  • All filenames are in PascalCase.

  • All functions and variable names follow Java naming conventions.

  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.

  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Copy link

codecov-commenter commented Nov 14, 2025
edited
Loading

Codecov Report

❌ Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.38%. Comparing base (a008cc2) to head (0f88632).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...ealgorithms/greedyalgorithms/KruskalAlgorithm.java 91.07% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## master #7068 +/- ##
============================================
+ Coverage 78.33% 78.38% +0.05% 
- Complexity 6670 6676 +6 
============================================
 Files 753 754 +1 
 Lines 22185 22241 +56 
 Branches 4356 4367 +11 
============================================
+ Hits 17378 17433 +55 
- Misses 4107 4108 +1 
 Partials 700 700 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guillermolara01 guillermolara01 marked this pull request as draft November 14, 2025 17:15
@guillermolara01 guillermolara01 marked this pull request as ready for review November 14, 2025 18:22
Copy link
Author

guillermolara01 commented Nov 18, 2025
edited
Loading

Fixes #7067

Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@DenizAltunkapan DenizAltunkapan Awaiting requested review from DenizAltunkapan DenizAltunkapan is a code owner

@yanglbme yanglbme Awaiting requested review from yanglbme yanglbme is a code owner

@alxkm alxkm Awaiting requested review from alxkm alxkm is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /