// TOPIC

#graphs

7 articles

Beginner
01

Graphs: Everything Is Connected

Graphs model maps, social networks, and dependencies. Learn how nodes and edges work, how to represent them, and what BFS and DFS unlock.

#graphs#data-structures#bfs
10 min
◆◆IntermediateGoogleAmazon
02

Union-Find (Disjoint Set Union)

Union-Find (disjoint set union) answers 'are these two nodes connected?' in near-constant time. Master path compression, union by rank, and Kruskal's MST.

#union-find#disjoint-set-union#graphs
12 min
◆◆IntermediateGoogleMeta
03

Graphs

Learn the graph data structure: adjacency lists vs matrices, BFS and DFS traversal, and the grid-as-graph reframe that cracks whole problem categories.

#graphs#data-structures#bfs
12 min
◆◆IntermediateGoogleAmazon
04

Topological Sort

Order the nodes of a DAG so every edge points forward — the algorithm that drives build systems, package managers, course schedulers, and anything else that lives and dies by dependency ordering.

#graphs#dag#topological-sort
13 min
◆◆◆AdvancedGoogleAmazon
05

Shortest Paths (Dijkstra, Bellman-Ford, BFS)

Pick the right shortest-path algorithm: BFS for unweighted graphs, Dijkstra for non-negative weights, Bellman-Ford for negative edges — with every gotcha.

#graphs#shortest-path#dijkstra
15 min
◆◆IntermediateAmazonGoogle
06

DFS Patterns

Depth-first search is the backbone of cycle detection, flood fill, path enumeration, and clone graph — master the visited-set template, the 3-color trick, and when to reach for DFS over BFS.

#graphs#dfs#traversal
14 min
◆◆IntermediateAmazonGoogle
07

BFS Patterns

Queue-driven level-by-level traversal and why breadth-first search is the only guaranteed way to find shortest paths in unweighted graphs. Templates, traps, and four worked problems.

#graphs#bfs#traversal
13 min