Question DSA-GRAPH-0023
EasyWhat is an adjacency list?
- A.
A list of all the vertices only
- B.
A sorted list of edge weights
- C.
Show answer and explanation
Answer: C
It uses O(V + E) space, which suits sparse graphs.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Graphs question
What is an adjacency list?
A list of all the vertices only
A sorted list of edge weights
Answer: C
It uses O(V + E) space, which suits sparse graphs.
For each vertex, a list of its neighbours
A V × V table of 0s and 1s