This repository contains my systematic implementation of fundamental graph and digraph algorithms in Java, created while learning graph theory and algorithmic problem-solving.
The focus of this project is conceptual clarity, correctness, and algorithmic understanding, rather than frameworks or libraries.
The repository is divided into undirected graphs (graph/) and directed graphs (digraphs/) to keep concepts clearly separated.
-
No external libraries — only core Java
-
Explicit data structures (Stacks, Queues, Lists)
-
Algorithm-first approach
-
Clear separation of: graph representation, traversal logic, problem-specific algorithms
-
Inspired by classical algorithms (e.g., Euler, Hierholzer, BFS, DFS)
All algorithms are implemented with optimal complexity:
Compile:
javac graph/*.java digraphs/*.javaRun (example):
java graph.EulerCycleMost classes contain a main() method for direct execution and testing.
- Algorithms, 4th Edition — Robert Sedgewick & Kevin Wayne
Aditya Kumar
Learning graph algorithms with a focus on correctness, clarity, and fundamentals.
This repository is meant to learn graphs properly, not just solve problems.