Abstract network nodes, representing an adjacency list.

A compact way to represent a graph.

What an adjacency list is

An adjacency list is a way of representing a graph, which is a collection of nodes connected by edges. In an adjacency list, each node has its own list of the other nodes it is directly connected to. By keeping, for every node, a record of its neighbors, the adjacency list captures the whole structure of connections in the graph in a compact form.

Listing each node's neighbors

The idea behind an adjacency list is simple: for each node in the graph, store a list of the nodes it links to. If you want to know what a particular node is connected to, you look at its list. Taken together, all these per-node lists describe every connection in the graph, which is how the adjacency list represents the graph's structure.

Efficient for sparse graphs

An adjacency list is especially space-efficient for graphs that have relatively few connections compared to the number of possible ones, often called sparse graphs. Because it only records the connections that actually exist, it does not waste space on absent ones. This makes the adjacency list a practical choice for representing many real-world graphs.

Using an adjacency list

With an adjacency list, finding a node's neighbors is direct: you simply read its list. This supports many graph operations, such as exploring the graph by moving from a node to its neighbors. The representation fits naturally with algorithms that traverse a graph by repeatedly looking at what each node connects to.

Why adjacency lists matter

Adjacency lists matter because they provide a compact, practical way to store graphs, particularly sparse ones, and they support efficient traversal. Graphs appear throughout computer science, so representing them well is important. Understanding the adjacency list clarifies one of the main ways that the connections in a graph can be stored and worked with.

Why it matters

The adjacency list is a fundamental way to represent graphs. Understanding what it is - a per-node list of each node's neighbors - clarifies how programs store and explore networks of connections. For anyone interested in computer science, it is a valuable concept to understand.

See also: What is a graph data structure? Explained, What is a data structure? Explained.

Sources

Published date reflects the original event date (2026-10-21). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply