Skip to content
Related Articles
Open in App
Not now

Related Articles

Data Structures | Graph | Question 1

Improve Article
Save Article
Like Article
  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

Which of the following is an advantage of adjacency list representation over adjacency matrix representation of a graph?
(A) In adjacency list representation, space is saved for sparse graphs.
(B) DFS and BSF can be done in O(V + E) time for adjacency list representation. These operations take O(V^2) time in adjacency matrix representation. Here is V and E are number of vertices and edges respectively.
(C) Adding a vertex in adjacency list representation is easier than adjacency matrix representation.
(D) All of the above


Answer: (D)

Explanation: See https://www.geeksforgeeks.org/graph-and-its-representations/

Quiz of this Question

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!