Master GraphAlgorithms Visually
Understand graph traversal, shortest paths, and network algorithms with interactive visualizations.
Choose Your AlgorithmStart Visualizing
Click on any algorithm card to see it in action with interactive step-by-step visualization
Dijkstra's Algorithm
Finds shortest path from source to all vertices in weighted graphs using greedy approach.
O((V+E) log V)O((V+E) log V)Breadth First Search
Level-order traversal that explores all vertices at present depth before moving deeper.
O(V+E)O(V+E)Depth First Search
Explores as far as possible along each branch before backtracking.
O(V+E)O(V+E)Bellman-Ford
Computes shortest paths from source, handles negative edge weights.
O(VE)O(VE)A* Search
Informed search algorithm using heuristics to find optimal path efficiently.
O(E)O(b^d)Kruskal's MST
Finds minimum spanning tree by selecting edges in increasing order of weight.
O(E log E)O(E log E)Prim's MST
Builds minimum spanning tree by growing tree from arbitrary starting vertex.
O(E log V)O(E log V)Floyd-Warshall
All-pairs shortest path algorithm using dynamic programming.
O(V³)O(V³)Topological Sort
Linear ordering of vertices in directed acyclic graph (DAG).
O(V+E)O(V+E)Tarjan's SCC
Finds strongly connected components in directed graph using DFS and low-link values.
O(V+E)O(V+E)Kosaraju's Algorithm
Finds strongly connected components using two DFS passes on original and transposed graph.
O(V+E)O(V+E)Articulation Points
Finds vertices whose removal increases the number of connected components.
O(V+E)O(V+E)Bridge Finding
Finds edges whose removal increases number of connected components (cut edges).
O(V+E)O(V+E)Eulerian Path
Finds path that visits every edge exactly once (Hierholzer's algorithm).
O(E)O(E)Hamiltonian Path
Finds path that visits every vertex exactly once (NP-complete problem).
O(n!)O(n!)Ford-Fulkerson
Computes maximum flow in flow network using augmenting paths.
O(E·f)O(E·f)Bipartite Check
Checks if graph is bipartite (2-colorable) using BFS/DFS coloring.
O(V+E)O(V+E)Cycle Detection
Detects cycles in directed/undirected graphs using DFS coloring technique.
O(V+E)O(V+E)Connected Components
Finds all connected components in undirected graph using DFS/BFS or Union-Find.
O(V+E)O(V+E)Each algorithm includes interactive visualization, code implementation, and complexity analysis
All Graph AlgorithmsDetailed Overview
Explore 19 graph algorithms with complexity analysis, pros & cons, and use cases
Complete AlgorithmComparison Table
Compare all 19 graph algorithms at a glance
| Algorithm | Type | Time | Space | Weighted | Negative Edges | All Pairs |
|---|---|---|---|---|---|---|
| Dijkstra's | Shortest Path | O((V+E) log V) | O(V) | |||
| BFS | Traversal | O(V+E) | O(V) | |||
| DFS | Traversal | O(V+E) | O(V) | |||
| Bellman-Ford | Shortest Path | O(VE) | O(V) | |||
| Floyd-Warshall | Shortest Path | O(V³) | O(V²) | |||
| A* Search | Shortest Path | O(E) | O(V) | |||
| Kruskal's MST | MST | O(E log E) | O(V) | |||
| Prim's MST | MST | O(E log V) | O(V) | |||
| Topological Sort | Ordering | O(V+E) | O(V) | |||
| Tarjan's SCC | Connectivity | O(V+E) | O(V) | |||
| Kosaraju's | Connectivity | O(V+E) | O(V) | |||
| Articulation Points | Connectivity | O(V+E) | O(V) | |||
| Bridge Finding | Connectivity | O(V+E) | O(V) | |||
| Eulerian Path | Path | O(E) | O(E) | |||
| Hamiltonian Path | Path | O(n!) | O(V) | |||
| Ford-Fulkerson | Flow | O(E·f) | O(V) | |||
| Bipartite Check | Property | O(V+E) | O(V) | |||
| Cycle Detection | Property | O(V+E) | O(V) | |||
| Connected Components | Connectivity | O(V+E) | O(V) |
Algorithm Categories & Notes
V: Number of vertices
E: Number of edges
f: Maximum flow value
Shortest Path: Find minimum distance
MST: Minimum Spanning Tree
Connectivity: Graph structure analysis
Traversal: Visit all vertices
Flow: Network flow algorithms
Property: Check graph properties