Question DSA-GRAPH-0003
EasyWhich representation is more space-efficient for a sparse graph?
- A.
Adjacency matrix
- B.
Neither
- C.
Show answer and explanation
Answer: D
An adjacency list uses O(V + E) space.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Graphs question
Which representation is more space-efficient for a sparse graph?
Adjacency matrix
Neither
Answer: D
An adjacency list uses O(V + E) space.
Both are equal
Adjacency list