Which data structure is commonly used to represent a network of interconnected entities?

Options

  • A. Array
  • B. Graph
  • C. Stack
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Graph

Detailed Explanation

A Graph is a non-linear data structure used to represent relationships or connections between entities. A graph consists of vertices (nodes) and edges. Graphs may be directed or undirected, weighted or unweighted. They are used in road networks, social networks, computer networks, dependency relationships, and web links. Common graph representations include an adjacency matrix and an adjacency list.