Repository navigation
Algorithms Library
A Java 21 library with comparator-based insertion, merge, quick and heap sorting, an unbalanced binary search tree, a separate-chaining hash map, a minimum binary heap, and directed and undirected graphs with deterministic BFS and DFS. The sample compares BFS with unit-weight Dijkstra and verifies that both return the same two-hop distance. Quick start · API contract
Source and verification
Source commit 50f7f02adfc403492172ed91917211d2584587d5. The attached 36-file source ZIP includes the Java implementation, Maven build, tests, working example, benchmark harness, documentation and licenses. Verify it with the attached SHA256SUMS.txt. MIT License · Third-party notices
Ubuntu CI verifies 27 JUnit tests, 38 smoke cases, the JAR-backed example, source formatting and documentation links, and the JAR dependency boundary of java.base. Tests include 240 generated sorting inputs, 72 graph fixtures checked against Floyd–Warshall and generated mutation sequences. Main CI · Tag CI
Complexity and scope
- Insertion and merge preserve comparator ties. Three-way quicksort has a quadratic worst case. The unbalanced BST and the chained map can take linear time on adverse inputs.
- The heap leaves equal-priority order unspecified. Shared mutable structures require caller synchronization.
- The generated tests use finite fixed-seed workloads. Standalone fuzz targets in this release: zero.
- The graph comparison assigns unit cost to every edge. The documented Windows JVM run covers 116 synthetic cases. Its measured results, including cases where standard Java was faster, apply to those configurations. Complexity · Benchmark results