Examveda

What is the purpose of the adjacency matrix in graph representation?

A. To store the depth-first search order.

B. To list the neighbors of each vertex.

C. To store only the vertices of the graph.

D. To store the edges and their weights between all pairs of vertices.

Answer: Option D


This Question Belongs to Data Structure >> Graphs

Join The Discussion

Related Questions on Graphs

What is a cycle in a graph?

A. A path that starts and ends at the same vertex with no other repetitions.

B. A path that includes all vertices exactly once.

C. A path with no edges.

D. A complete traversal of all vertices.