Adjacency List

noun

say it: “uh-JAY-sun-see LIST” /əˈdʒeɪsənsi lɪst/

A way of storing a graph that keeps, for each vertex, the list of the vertices it is joined to.

What is an adjacency list?

An adjacency list stores a graph as a list of neighbors for each vertex, often a dictionary from each vertex to its list. It is like an address book with a page per person and only their friends on it. It stores only the edges that exist, so it is the usual choice for big graphs where each vertex has a few neighbors.

In a sentence

  • “The social app keeps its friendships as an adjacency list, so listing one person's friends is quick.”

Level: Journeyman · More Data Structures terms at this level

Updated