Which data structure is used to represent a graph?

20 views
  • List (Correct Answer)
  • Stack
  • Queue
  • Tree

Explanation

Answer: a) List

Explanation: A graph is typically represented as a list of vertices and a list of edges connecting the vertices. The vertices can be stored in an array or a linked list, while the edges can be stored in a separate list or as part of the vertex structure.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs