Skip to content

Conversation

@Microindole
Copy link
Contributor

Description

Closes #6755

This PR adds a complete implementation of Edmonds's algorithm for finding the Minimum Spanning Arborescence in a directed graph.

The implementation follows the project's coding standards and includes:

  • A final utility class Edmonds.java with a private constructor.
  • Comprehensive Javadoc explaining the algorithm, its complexity, and usage.
  • A corresponding EdmondsTest.java file with thorough JUnit 5 tests covering various scenarios, including simple graphs, graphs with cycles, unreachable nodes, and invalid inputs.

Gifs/Screenshots (if applicable)

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 98.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.43%. Comparing base (f30d101) to head (dbc80bb).

Files with missing lines Patch % Lines
src/main/java/com/thealgorithms/graph/Edmonds.java 98.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6771      +/-   ##
============================================
+ Coverage     77.33%   77.43%   +0.10%     
- Complexity     6175     6208      +33     
============================================
  Files           721      722       +1     
  Lines         20600    20680      +80     
  Branches       3994     4019      +25     
============================================
+ Hits          15931    16014      +83     
+ Misses         4056     4054       -2     
+ Partials        613      612       -1     

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

Copy link
Member

@alxkm alxkm left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you for the contribution.

@alxkm alxkm merged commit 8b8434c into TheAlgorithms:master Oct 13, 2025
6 checks passed
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.

[FEATURE REQUEST] Proposal: Add Edmonds's Algorithm for Minimum Spanning Arborescence

3 participants