Graph Implementations


There are two common implementations for graphs


If we are implementing an undirected graph


Comparison of Implementations

Consider a graph G with N nodes and E edges (0 <= E <= N^2)