Beginner
Data Structures & Algorithms
Q16 / 100
What is an adjacency matrix?
Correct! Well done.
Incorrect.
The correct answer is B) A matrix where entry [i][j] is 1 (or weight) if edge (i,j) exists
B
Correct Answer
A matrix where entry [i][j] is 1 (or weight) if edge (i,j) exists
Explanation
An adjacency matrix uses O(V²) space. Checking if an edge exists is O(1), but iterating all edges is O(V²). Better for dense graphs.
Progress
16/100