Skip to content

[pull] master from williamfiset:master#130

Merged
pull[bot] merged 6 commits intoUncodedtech:masterfrom
williamfiset:master
Mar 17, 2026
Merged

[pull] master from williamfiset:master#130
pull[bot] merged 6 commits intoUncodedtech:masterfrom
williamfiset:master

Conversation

@pull
Copy link

@pull pull bot commented Mar 17, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

williamfiset and others added 6 commits March 16, 2026 16:27
* Refactor Boruvkas: add docs, fix compareTo overflow, clean up

Fix integer overflow bug in Edge.compareTo (cost - other.cost) by using
Integer.compare. Add algorithm Javadoc, remove unused UnionFind methods,
and simplify main example.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify UnionFind find to recursive implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused Edge methods, replace example with planar grid graph

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify solve loop and move mst init to constructor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Return Optional instead of null for MST and cost

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Refactor ConnectedComponentsAdjacencyList: rename, clean up, add docs

- Rename to ConnectedComponentsUnionFind to distinguish from DFS solver
- Replace Map<Integer, List<Edge>> with List<List<Integer>> adjacency list
- Remove unnecessary Edge class with cost field
- Move package-level UnionFind to private inner class
- Add Javadoc with complexity, graph diagram, and 0-indexed component ids
- Fix misleading "strongly connected" reference in old Javadoc

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify component IDs by reusing Union-Find roots directly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add componentSize method and comprehensive tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update README link for ConnectedComponentsUnionFind rename

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
)

- Rename to ConnectedComponentsDfs for brevity
- Eliminate visited array by using componentIds with -1 sentinel
- Make component IDs 0-indexed for consistency with UnionFind variant
- Add Javadoc with complexity, graph diagram, componentId() method
- Make solve() private, graph field final
- Update BUILD and README

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Remove DepthFirstSearchAdjacencyListIterative and
DepthFirstSearchAdjacencyListIterativeFastStack, keeping only the
recursive variant. Update BUILD and README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Mar 17, 2026
@pull pull bot added the ⤵️ pull label Mar 17, 2026
@pull pull bot merged commit eba25c9 into Uncodedtech:master Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant