0 0 votes You are given a large network (graph) consisting of data from Facebook: a million vertices corresponding to users, and undirected edges corresponding to friendships between users. Each edge is weighted in inverse proportion to the frequency of interaction between the two friends. You need to find a Minimum Spanning Tree of this network. Which algorithm will be better? (a) Prim's algorithm should be faster. (b) Kruskal's algorithm should be faster. (c) Both algorithms should take about the same time. Algorithms minimum-spanning-tree kruskals-algorithm test-series + – Churchill Khangar 1.2k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply goxul commented Nov 22, 2018 reply Follow flag Where are these questions from? Can you please post the source? 0 0 replyShare Deepanshu commented Nov 22, 2018 reply Follow flag i think prims better 0 0 replyShare kumar.dilip commented Nov 22, 2018 reply Follow flag a Prim's Algorithm. 0 0 replyShare Churchill Khangar commented Nov 23, 2018 reply Follow flag @goxul, they are asked in course work at IITD EET 0 0 replyShare Please log in or register to add a comment.
Best answer 1 1 vote Also, Prim's should be better as Kruskal would involving sorting the edges, which is not feasible when you millions of them. https://stackoverflow.com/questions/1195872/kruskal-vs-prim goxul answered Nov 22, 2018 • selected Nov 23, 2018 by Churchill Khangar goxul comment Share Follow 0 reply Please log in or register to add a comment.