Header Ads Widget

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)

Answer: c) O(E log V)

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

Answer: 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)

Answer: a) O(V+E)

  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)

Answer: c) O(n 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)

Answer: c) O(n 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

Answer: c) Binary Search

  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)

Answer: c) O(n 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  

 Similar posts:-

  1. C-programming MCQs part-1
  2. C-programming MCQs part-2
  3. C-programming MCQs part-3
  4. C-programming MCQs part-4
  5. C-programming MCQs part-5
  6. C-programming MCQs part-6
  7. COA MCQs part-1
  8. COA MCQs part-2
  9. COA MCQs part-3
  10. COA MCQs part-4

EasyCodingZone


Must check this :-

  1. Microprocessor 8085 MCQs part-1
  2. Microprocessor 8085 MCQs part-2
  3. Microprocessor 8085 MCQs part-3
  4. CSS MCQs part-1
  5. CSS MCQs part-2
  6. CSS MCQs part-3
  7. CSS MCQs part-4
  8. CSS MCQs part-5
  9. Engineering Mathematics -II MCQs part-1
  10. Engineering Mathematics -II MCQs part-2
  11. Engineering Mathematics -II MCQs part-3
  12. Engineering Mathematics -II MCQs part-4
  13. Engineering Mathematics -II MCQs part-5
  14. Operating system MCQs part-1
  15. Operating system MCQs part-2
  16. Operating system MCQs part-3
  17. Operating system MCQs part-4
  18. Operating system MCQs part-5



Post a Comment

0 Comments