Commit Graph

17 Commits

Author SHA1 Message Date
Sameer Prajapati
4c5525a2e0 feat: Added Gomory–Hu Tree (all-pairs min-cuts via n1 max-flows) (#6818)
* Add Gomory–Hu Tree (all-pairs min-cuts via n1 max-flows)

* Stabilize Monte Carlo integration with antithetic variates to reduce variance

* Fix Checkstyle in GomoryHuTreeTest: remove inner assignments, add braces, split declarations

* SpotBugs: use RandomGenerator interface in test helper

---------

Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
2025-11-28 08:47:53 +00:00
sharan
d717ca4fd5 feat: Add Hierholzer's Algorithm for Eulerian Circuits (#6726)
* feat: Add Hierholzer's Algorithm for Eulerian Circuits

* fix: Add more test cases to improve code coverage

* feat: Add Hierholzer's Algorithm for Eulerian Circuits

* fix: Apply clang-format after merge

* fix: Apply all formatting, style, and efficiency fixes

* docs: Apply feedback and improve Javadoc

* docs: Add Hierholzer's Algorithm to DIRECTORY.md
2025-11-02 10:36:10 +00:00
sairamsharan
bb6385e756 feat: Add Stoer-Wagner Algorithm for Minimum Cut (#6752)
* feat: Add Stoer-Wagner Algorithm for Minimum Cut

* fix: Correct Stoer-Wagner implementation

* fix: Remove unused import

* fix: Apply clang-format
2025-10-29 09:08:05 +00:00
Harshendu Swarnakar
6b7d201657 Hierholzer path algorithm (#6822)
* Added HierholzerEulerianPath algorithm

* Added Hierholzer Algorith to find Eulerian Path

* Added Hierholzer Algorith to find Eulerian Path

* Added Hierholzer Algorith to find Eulerian Path

* Added Hierholzer Algorith to find Eulerian Path

* Added Hierholzer Algorith to find Eulerian Path

* Added Hierholzer Algorith to find Eulerian Path

* Added Hierholzer Algorith to find Eulerian Path

---------

Co-authored-by: crashmovies <swarnakarharshendu420@gmail.com>
2025-10-17 23:53:26 +02:00
Sameer Prajapati
fb5a7653c1 feat: Add Hungarian Algorithm (Assignment Problem) with tests and reference [GRAPHS] (#6808)
* feat(graph): add Hungarian Algorithm (assignment) with tests; update directory

* style(graph): split multiple variable declarations to satisfy Checkstyle
2025-10-16 23:05:48 +02:00
Sameer Prajapati
1437036b19 feat(graph): add Push–Relabel max flow with tests and index (#6793)
* feat(graph): add Push–Relabel max flow with tests and index

* style(checkstyle): reduce discharge parameter count via State holder

* chore(pmd): make discharge void and remove empty else; satisfy PMD

---------

Co-authored-by: a <alexanderklmn@gmail.com>
2025-10-15 22:51:14 +02:00
Sameer Prajapati
8726d401b7 Add Yen’s K-shortest loopless paths with tests [GRAPHS] (#6773)
* Add Yen’s K-shortest loopless paths with tests and index update

* style: fix Checkstyle in Yens algorithm and tests

* fix: resolve SpotBugs in Yens algorithm

* fix (PMD): rename short variables in the code

* (pmd): code fixes

* fix(bloomfilter): hash arrays by content to satisfy array membership tests

* style(pmd): fix EmptyControlStatement in validate() by returning early when src==dst

* style(pmd): remove unnecessary return in validate()
2025-10-13 20:22:55 +02:00
Microindole
8b8434cb51 feat(graph): Add Edmonds's algorithm for minimum spanning arborescence (#6771)
* feat(graph): Add Edmonds's algorithm for minimum spanning arborescence

* test: Add test cases to achieve 100% coverage
2025-10-13 15:47:50 +03:00
Sameer Prajapati
883a050162 Added Dinic’s Max Flow algorithm with tests [Graphs] (#6762)
* Add Dinics max flow algorithm with tests and index update

* Docs: add Dinic reference link and apply clang-format

* Fix: Checkstyle violations in Dinic and tests

* style: apply clang-format to Dinic and tests

---------

Co-authored-by: a <alexanderklmn@gmail.com>
2025-10-12 23:45:46 +02:00
ananya-research
8ca2d9f820 Create zero_one_bfs.java (#6560)
* Create zero_one_bfs.java

* Rename zero_one_bfs.java to ZeroOneBfs.java

* Update ZeroOneBfs.java

* Update ZeroOneBfs.java

* Create ZeroOneBfsTest.java

* Update ZeroOneBfsTest.java

---------

Co-authored-by: a <alexanderklmn@gmail.com>
2025-10-06 20:14:32 +02:00
Sivasuthan Sukumar
f8f315eaa8 Extend Graph Algorithms: Added Two Popular Algorithms: BronKerbosch, EdmondsKarp (#6576)
* Bron–Kerbosch algorithm added.

* test:Bron–Kerbosch algorithm added.

* lint checked.

* clang-format linting checked.

* lint checked in remote

Removed duplicate import statements for assertions.

* Remove unnecessary blank line in BronKerboschTest

* EdmondsKarp algorithm added.

* reformatted

---------

Co-authored-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
2025-10-01 21:44:43 +02:00
Stathis Veinoglou
2dd6a13707 Add DFS with parent-completion constraint for DAG traversal (#6467)
* Add DFS with parent-completion constraint for DAG traversal

* warning in PartitionProblem.java affecting tests

* added clang-format and updated javadoc

* optimized imports and rechecked camelCase format in tests

* removed .* import and made small visual change

* replaced a inline return with correct {} block

* Removed changed in PartitionProblem.java, Renamed class name to be straightforward about the implementation.Added full names instead of shortcuts, and included record.

* updated for clang format

---------

Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
2025-08-15 16:41:52 +00:00
ptzecher
657f433413 Hopcroft karp Algorithm implementation and tests (#6465)
* Add Hopcroft-Karp algorithm and tests

* Adding wikipedia url for Algorithm

* fixing test issues

* remove unused field flagged by PMD
2025-08-14 19:42:51 +02:00
Deniz Altunkapan
743f9660a8 Add Traveling Salesman Problem (#6205) 2025-03-31 22:18:19 +00:00
Deniz Altunkapan
d4b28b348e Add Constrained Shortest Path Problem (CSPP) / Shortest Path Problem with Resource Constraints (SPPRC) (#6155) 2025-01-28 12:33:58 +02:00
Strange Developer
df0c997e4b General performance improvement (#6078) 2024-11-01 19:52:42 +02:00
Vignesh.S
2f9f75a3a7 Add StronglyConnectedComponentOptimized (#5825) 2024-10-23 05:44:02 +00:00