Java Graph Algorithms

Java Graph Algorithms is an MIT-licensed Java 21 project built around a generic weighted adjacency-list graph.

The repository includes:

  • deterministic breadth-first and depth-first traversals;
  • Dijkstra’s shortest-path algorithm with path reconstruction;
  • Kruskal’s minimum spanning forest with union-find;
  • JUnit coverage for representation, preconditions, disconnected graphs, and boundary cases; and
  • a student activity and instructor note.

The project is intentionally small enough for a student to read from the graph representation through the algorithm tests.

Direct Link