On a sparse graph (E far less than V²), the adjacency list representation
Awastes O(V²) bits regardless of edge count
Buses O(V + E) space, much less than O(V²)
Cis forbidden by the SQL standard
Dsupports only undirected graphs
Answer & Solution
Correct answer: B. uses O(V + E) space, much less than O(V²)
Adjacency lists store per-vertex neighbour lists, totalling O(V + E) cells.
On sparse graphs this is far smaller than the matrix's fixed O(V²).
Matrices waste rows of zeros for vertices with few neighbours.
Lists handle both directed and undirected graphs
SQL has nothing to do with this choice.
Keep practising Algorithms
Browse all Algorithms questions for GATE CSE, or explore more Computer Science topics.