Shortest Paths & MST
3. Graph Algorithms
3. GRAPH ALGORITHMS
Shortest Paths & MST
Weighted edges and connectivity: the shortest path algorithms, union-find, and the spanning tree that connects everything cheaply with the least total weight.
6 resources 0 labs
The greedy argument behind Dijkstra traced on a worked graph, which makes the priority queue choice immediately obvious.
VIDEOENFREE 19 min4.9 (70)
Dijkstra with a priority queue, including why negative edges break it and how the correctness proof works step by step.
TEXTENFREE 30 min4.9 (68)
Disjoint set union with path compression and union by size, the structure behind most connectivity questions in practice.
TEXTENFREE 25 min4.9 (58)
Shortest path modelling for contest problems, including when to pick Dijkstra, Bellman-Ford or Floyd-Warshall and why you would pick each one.
TEXTENFREE 30 min4.7 (67)
The implementation detail that separates an O(V squared) answer from the O(E log V) one interviewers usually expect.
VIDEOENFREE 23 min4.3 (66)
Kruskal's minimum spanning tree with the union-find it depends on, both the algorithm and the argument for its correctness.
TEXTENFREE 25 min4.2 (47)