Adjacency list
An adjacency list is a graph representation that associates each vertex with a collection of its neighboring vertices or incident edges.
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
A graph representation that stores, for each vertex, the vertices or edges directly connected to it.
- How it is used
- Represents graph connectivity for reusable graph algorithms and vertex-neighbor queries.
- How deep it goes
- Defines the representation and demonstrates Swift storage and lookup, but stops short of detailed graph algorithms.
- Examples
- Uses a city graph and printed neighbor lists to show reciprocal adjacency.
- What you can do after
- Build it from scratch as a Swift graph with indexed vertices, adjacency lists, edges, and neighbor lookup.
Graph Neural Networks in Action
An adjacency list is a graph representation that records the neighboring nodes associated with each node.
- How it is used
- Transforms raw relationships into graph data that supports exploration, visualization, preprocessing, and GNN training.
- How deep it goes
- Defines the representation and walks through Python construction, serialization, and undirected-connection handling without covering algorithmic complexity.
- Examples
- Uses YelpChi graph data and a recruiting network of candidates connected through referral relationships.
- What you can do after
- Build it from scratch in Python, serialize it, and load it into NetworkX or PyTorch Geometric.
Read how Graph Neural Networks in Action explains adjacency list →
Grokking Data Structures
An adjacency list is a graph representation that associates each source vertex with a collection of its outgoing edges or destination vertices.
- How it is used
- Represents graph vertices and outgoing edges in a form convenient for traversal and search.
- How deep it goes
- Defines the representation and sketches Python classes, edge operations, and deletion, but does not show the complete implementation.
- Examples
- Uses Python dictionaries, Vertex and Graph classes, singly linked lists, and destination vertices as stored edge values.
- What you can do after
- Build it from scratch using a Python dictionary, Vertex objects, and linked-list, list, or set adjacency containers.
Advanced Algorithms and Data Structures
An adjacency list is a graph representation that stores, for each vertex, a list of its incident or outgoing edges and neighboring vertices.
- How it is used
- Represents graph edges for neighbor lookup, edge traversal, and path-finding algorithms.
- How deep it goes
- Explains the mapping, class structure, operations, and complexity trade-offs, stopping short of full algorithm implementations.
- Examples
- Uses a vertex-to-edge dictionary, a four-vertex listing, and a Graph class with weighted, labeled Edge objects.
- What you can do after
- Build it from scratch using vertex collections, edge lists, validation, and adjacency-list operations.
Read how Advanced Algorithms and Data Structures explains adjacency list →
Learn Haskell by Example
An adjacency map is a graph representation that maps each node to a list of nodes connected from it.
- How it is used
- Represents word and graph connections for traversal.
- How deep it goes
- Defines pair-list and node-map representations, then compares indexing and undirected-edge costs.
- Examples
- Uses ladder graphs and the two-node map [(1, [2]), (2, [1])].
- What you can do after
- Evaluate graph representations and choose a pair list or indexed adjacency map for traversal.
Related concepts
- graphused by · A graph is a mathematical structure consisting of vertices connected by edges that represent relationships or connections.
- adjacency matrixalternative to · An adjacency matrix is a square matrix whose rows and columns represent graph vertices and whose entries indicate edges or encode edge weights between vertex pairs.
- edge crossoverused by · A permutation crossover operator that constructs offspring by preserving adjacency and connectivity information from parent permutations.
- graph convolutional networkuses · A graph convolutional network is a graph neural network that computes representations by transforming and aggregating information from graph neighborhoods.
- linked listuses · An ordered sequence of elements stored in separate nodes connected by links or references rather than in one contiguous storage region.
- sparse graphuses · A sparse graph is a graph with relatively few edges compared with the number of possible edges among its vertices.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




