Graph Representation Selection
For sparse graphs, an adjacency list is generally better because the number of edges is much smaller than V², so storing only existing edges saves memory. For dense graphs, an adjacency matrix can be appropriate because most possible edges exist and O(1) edge lookup can be valuable.
Sparse graph: Prefer adjacency list.
Dense graph: Matrix can be attractive.
Need O(1) edge lookup: Matrix is advantageous.
Need efficient neighbor traversal: List is usually advantageous.