What is an Adjacency List?

What is an Adjacency List?

Approach: Describe a way to represent a graph using an array of lists.

A collection of unordered lists used to represent a finite graph. Each list describes the set of neighbors of a vertex in the graph.

Follow-up: Compare its space complexity to an adjacency matrix.

Key concepts: memory efficiency, sparse graphs, neighbors.