Graph data structure multiple choice questions with answers | FAQ | MCQ

 

  1. What is a graph data structure? a) A non-linear data structure that consists of nodes and edges - Answer b) A linear data structure that consists of nodes and edges c) A hierarchical data structure that consists of nodes and edges d) A tree-based data structure that consists of nodes and edges

  2. What is a directed graph? a) A graph where edges have a direction from one node to another - Answer b) A graph where edges have no direction c) A graph where edges are bidirectional d) A graph where nodes have a direction

  3. What is the time complexity of searching for an element in an unweighted graph? a) O(1) b) O(n) - Answer c) O(log n) d) O(n log n)

  4. What is the shortest path between two nodes in a graph called? a) Shortest route b) Shortest distance - Answer c) Shortest link d) Shortest connection

  5. What is the purpose of weighted edges in a graph data structure? a) To represent the cost or distance between nodes - Answer b) To represent the direction of the edge c) To represent the number of nodes in the graph d) To represent the height of the graph

Comments

Popular posts from this blog

How to study Data Structure for Campus Placement?

How to learn Python programming?

Queue data structure multiple choice questions with answers