# Algorithm multiple choice questions part-6

## Some interesting Graph Questions:-

1. What is a Minimum Spanning Tree (MST)? a) A set of edges that connects all vertices of a graph with minimum weight b) A set of vertices that connects all edges of a graph with minimum weight c) A set of edges that connects some vertices of a graph with maximum weight d) A set of vertices that connects some edges of a graph with maximum weight

Answer: a) A set of edges that connects all vertices of a graph with minimum weight

1. What are the applications of Minimum Spanning Tree (MST)? a) Network design, approximation algorithms for NP-hard problems, cluster analysis b) Sorting, searching, traversing c) Hashing, encryption, decryption d) None of the above

Answer: a) Network design, approximation algorithms for NP-hard problems, cluster analysis

1. Which of the following algorithms is used to find a Minimum Spanning Tree? a) Binary Search b) Quicksort c) Dijkstra's Algorithm d) Prim's Algorithm, Kruskal's Algorithm

Answer: d) Prim's Algorithm, Kruskal's Algorithm

1. What is the time complexity of Dijkstra's Algorithm for finding the shortest path in a graph? a) O(V+E) b) O(V^2) c) O(E log V) d) O(nLogn)

1. Which data structure is commonly used to represent a graph? a) Array b) Linked List c) Tree d) Both Array and Linked List

1. What is the time complexity of Breadth First Traversal for a graph represented by an Adjacency List? a) O(V+E) b) O(V^2) c) O(E log V) d) O(nLogn)

1. What is the time complexity of Merge Sort algorithm? a) O(n) b) O(n^2) c) O(n log n) d) O(log n)

1. What is the time complexity of QuickSort algorithm? a) O(n) b) O(n^2) c) O(n log n) d) O(log n)

1. Which of the following algorithms uses Divide and Conquer technique? a) Breadth First Traversal b) Depth First Traversal c) Binary Search d) Dijkstra's Algorithm

1. What is the time complexity of Closest Pair of Points algorithm using Divide and Conquer technique? a) O(n) b) O(n^2) c) O(n log n) d) O(log n)

1. What is a graph? a) A set of edges only b) A set of vertices only c) A set of ordered pairs of edges and vertices d) None of the above

Answer: c) A set of ordered pairs of edges and vertices

1. What is an Adjacency Matrix? a) A 2D array of size V x V where V is the number of vertices in a graph b) An array of linked lists c) A balanced binary search tree d) None of the above

Answer: a) A 2D array of size V x V where V is the number of vertices in a graph

Pre  ðŸ‘ˆ                                ðŸ‘‰  Next