Adjacency List

A way to represent a graph. Consider the following graph

Pasted image 20221228194609.png

Which you can represent as following

graph = {
    0: [1, 2],
    1: [0, 2],
    2: [0, 1, 3, 4],
    3: [2],
    4: [2, 5],
    5: [4]
}

The key will be the current node and values will be the list of Vertex that it connects to