Tag: Graph Algorithms
-
Adjacency List vs Matrix: 47% Faster DFS in Interview Code
DFS performance comparison: adjacency list beats matrix by 47% in interview problems. See which graph representation wins and why it matters.
-
BFS vs DFS vs Bidirectional: Shortest Path Speed Test
Compare BFS, DFS, and bidirectional search performance in shortest path problems. Benchmark reveals the fastest algorithm with surprising results.
-
Union-Find Basics to Kruskal’s MST Implementation
Union-Find from scratch: path compression, union by rank, and implementing Kruskal's MST. The O(ฮฑ(N)) trick and mistakes I made along the way.
-
Dijkstra vs Bellman-Ford: Shortest Path Algorithm Guide
Dijkstra breaks on negative edges. Bellman-Ford runs O(VE). Pick wrong and debug for hoursโhere's the 30-second decision tree.