Graph Algorithms

8 graph algorithms including traversal, shortest path, MST, and topological sort

Graph Algorithm Reference

Dijkstra's Algorithm

Finds shortest path from source to all vertices. Greedy approach, no negative edges.

Time: O(V²) / O(E log V) Space: O(V)

Prim's MST

Builds minimum spanning tree by adding cheapest edge from tree to fringe.

Time: O(E log V) Space: O(V)