Maintaining a graph in memory by means of its adjacency matrix is known as:

2025

Maintaining a graph in memory by means of its adjacency matrix is known as:

  1. A.

    Complete Representation

  2. B.

    Linked Representation

  3. C.

    Circular Representation

  4. D.

    Sequential Representation

Attempted by 785 students.

Show answer & explanation

Correct answer: D

Correct answer: Sequential Representation

Explanation: An adjacency matrix represents a graph as an n × n two-dimensional array where the entry at row i and column j indicates whether an edge exists between vertex i and vertex j (or stores the weight of that edge). This storage is array-based, so it is called a sequential representation.

  • Storage: uses a 2D array of size n × n, so memory is O(n²).

  • Edge lookup: checking existence of an edge between two vertices is O(1) by indexing into the matrix.

  • Best use case: efficient for dense graphs where many edges exist.

  • Alternative: a linked (adjacency list) representation stores a list of neighbors per vertex and is more memory-efficient for sparse graphs.

Summary: Maintaining a graph by its adjacency matrix is called the sequential (array-based) representation because the graph is stored in a contiguous two-dimensional array.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Coding For Placement