A Java library implementing classic graph algorithms for traversal, connectivity, and pathfinding. Useful for learning, teaching, and integrating graph logic into larger applications.
- Breadth First Traversal
- Depth First Traversal
- Connected Component Problems
- Island Problem
- Has Path Problem
- Shortest Path Problem
graph-algos/
├── pom.xml
├── README.md
├── src/
│ ├── main/
│ │ └── java/
│ │ └── graph/algos/
│ │ ├── breadth/first/
│ │ ├── connected/
│ │ ├── depth/
│ │ └── haspath/
│ └── test/
│ └── DepthFristTraversalTest.java
└── target/
- Java 8 or higher
- Maven
Clone the repository and build using Maven:
mvn clean installImport the relevant classes in your Java project and use the algorithms as needed. Example:
import graph.algos.breadth.first.BreadthFirstTraversal;
// ...existing code...