Adjacency List

← Back to Graph Representations

Store a list of neighbors for each vertex. Space O(V+E). Best for sparse graphs. Most common representation in practice (used in BFS, DFS, Dijkstra).

property graphs