Adjacency list
Adjacency matrices are usually quite sparse, wasting space and compute.
We can instead also store the graph as an adjacency list, where we store tuples of , the -th entry describing the edge between nodes and .In other words, it grows with the number of existing edges rather than the number of possible edges!
This format is also permutation invariant!