Java icon indicating copy to clipboard operation
Java copied to clipboard

Feature/kruskal algorithm

Open guillermolara01 opened this issue 3 months ago • 2 comments

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

  • [x] I have read CONTRIBUTING.md.

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

  • [x] All filenames are in PascalCase.

  • [x] All functions and variable names follow Java naming conventions.

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

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

guillermolara01 avatar Nov 14 '25 06:11 guillermolara01

Codecov Report

:x: Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 78.38%. Comparing base (a008cc2) to head (0f88632). :warning: 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 :warning:
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              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Nov 14 '25 06:11 codecov-commenter

Fixes #7067

guillermolara01 avatar Nov 18 '25 20:11 guillermolara01