PA of Algorithms Q124

0. Match the following:
List-IList-II
A.Prim's algorithm for minimum spanning
tree
1.Backtracking
B.Floyd-Warshall algorithm for all pairs
shortest paths
2.Greedy method
C.Mergesort3.Dynamic programming
D.Hamiltonian circuit4.Divide and Conquer

 ABCD
(a)3241
(b)1243
(c)2341
(d)2134

  • Option : C
  • Explanation :
    Prims algorithm is greedy method because it choose minimum distance node.
    Floyd warshal’s is dynamic because it changes the distance on each iteration.
    Merge sort is divide and conquer because it divide the whole list is sublist and combine after sorting each sublist
    Hamiltonian cycle is based on backtracking.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *