neighbour
A vertex that is directly connected to a given vertex by an edge.
In more detail
An adjacency list stores, for each vertex, the list of its neighbours. Breadth-first search visits all of a vertex's neighbours before moving on to theirs.
Related terms
- adjacency list — A graph representation that stores, for each vertex, a list of its neighbours, typically as a dict of lists in Python.
- vertex — One point in a graph, such as a city on a road map or a person in a social network; also called a node.
- breadth-first search — A graph search that visits the start vertex, then all its neighbours, then all of theirs, spreading out in waves using a FIFO queue.
Taught in
- Hash Tables: Chaining, Open Addressing And Load Factor — Algorithms & Data Structures for Working Engineers
- Comparison Sorts: Insertion, Merge And Quicksort — Algorithms & Data Structures for Working Engineers
- Representing A Graph: Matrix Or Adjacency List — Algorithms & Data Structures for Working Engineers
- Breadth-First Search And Shortest Paths By Hops — Algorithms & Data Structures for Working Engineers
- Depth-First Search, Cycles And Topological Order — Algorithms & Data Structures for Working Engineers
- Dynamic Programming: Memoisation And Tabulation — Algorithms & Data Structures for Working Engineers