Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Algorithms | Greedy Algorithms | Question 5

  • Last Updated : 28 Jun, 2021

Which of the following is true about Kruskal and Prim MST algorithms? Assume that Prim is implemented for adjacency list representation using Binary Heap and Kruskal is implemented using union by rank.
(A) Worst case time complexity of both algorithms is same.
(B) Worst case time complexity of Kruskal is better than Prim
(C) Worst case time complexity of Prim is better than Kruskal

Answer: (A)

Explanation: See following

Kruskal’s Minimum Spanning Tree Algorithm

Prim’s MST for Adjacency List Representation

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!