Adjacency List for Graphs
An adjacency list is a list of lists used to represent a finite graph.
An adjacency list stores a list of vertices for each vertex that indicates where the connections are:
0 connects with 1, 4
1 connects with 0, 2, 3, 4
2 connects with 1, 3
3 connects with 1, 2, 4
4 connects with 0, 1, 3
References
- boot.dev
Next -> breadth-first-search
#computer_science #search #function #structure #boot_dev #hash #graph #adjacency #programming #data #memory #list