🕸

Advanced Graphs

MST, strongly connected components, bridges, and advanced shortest path algorithms.

0 Problems4-5 hours

Overview

Advanced graph algorithms tackle minimum spanning trees, strongly connected components, bridges, and articulation points. These appear in system design contexts and senior-level interviews.

Complexity Summary

Time Complexity

MST O(E log E) · SCC O(V+E)

Space Complexity

O(V+E)

Key Patterns & Techniques

Learn the core patterns in this topic. Each block explains when to use the pattern, the intuition behind it, and a compact code example.

1

MST

Concept

Minimum Spanning Tree: Kruskal (sort edges + union-find) or Prim (greedy + heap)

Practice questions for this pattern
2

Kruskal

Concept

sort edges by weight, add if it does not create a cycle

Practice questions for this pattern
3

Prim

Concept

greedily add the cheapest edge connecting visited and unvisited nodes

Practice questions for this pattern
4

SCC

Concept

Strongly Connected Components: Kosaraju or Tarjan O(V+E)

Practice questions for this pattern
5

Bridges

Concept

edges whose removal disconnects graph; Tarjan's bridge finding

Practice questions for this pattern
6

Articulation Points

Concept

vertices whose removal disconnects graph

Practice questions for this pattern
DSA Practice Online - 150+ Coding Interview Questions | LeetCode Alternative | InstaMock - AI Mock Interview