Skip to content

Conversation

@guillermolara01
Copy link

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

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2025

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants