Graphs
Directed, undirected, weighted graphs and their representations.
A set of vertices connected by one-way edges: an edge u→v does not imply v→u.
Vertices joined by two-way edges: {u, v} can be traversed in either direction.
A graph whose edges carry numeric weights (cost, distance, capacity), so path length is a sum of weights rather than a hop count.
A graph where every edge counts the same, so the shortest path is the one with the fewest edges and BFS finds it in O(V + E).
A directed graph with no cycles, guaranteeing a topological order in which every edge points forward.
A V×V grid where cell [u][v] stores whether (or how heavily) u connects to v, giving O(1) edge lookup at O(V²) space.
For each vertex, a list of its neighbors (and edge weights), giving O(V + E) space and O(deg) neighbor iteration — the default graph representation.
The graph as a flat list of (u, v[, w]) tuples — minimal, sortable, and exactly what Kruskal and Bellman-Ford need.