You are viewing a single comment's thread. Return to all comments →
Kruskal's Algorithm is also worked for me. but we need to implement Disjoint sets with Union by rank and path compression
Yes I know. but Prim should be ideally and morally used in case of more edges than vertices.
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Project Euler #107: Minimal network
You are viewing a single comment's thread. Return to all comments →
Kruskal's Algorithm is also worked for me. but we need to implement Disjoint sets with Union by rank and path compression
Yes I know. but Prim should be ideally and morally used in case of more edges than vertices.