In which case adjacency list is preferred in front of an adjacency matrix?

Category: QuestionsIn which case adjacency list is preferred in front of an adjacency matrix?
Editor">Editor Staff asked 1 month ago

In which case adjacency list is preferred in front of an adjacency matrix?
 
(a) Dense graph
 
(b) Sparse graph
 
(c) Adjacency list is always preferred
 
(d) Complete graph
 
This interesting question is from Adjacency List in division Graph of Data Structures & Algorithms I
 
The question was asked in class test.

1 Answers
Editor">Editor Staff answered 1 month ago

Right answer is (b) Sparse graph
 
Easy explanation – In case of sparse graph most of the entries in the adjacency matrix would be 0, hence adjacency list would be preferred.