Implementation of Kruskal's algorithm using priority queues

20 views
Skip to first unread message

Adarsh Kishore

unread,
Apr 9, 2022, 2:10:59 PM4/9/22
to sage-support
Hi everyone,

Is there a way to implement Kruskal's algorithm for finding the MST of an undirected graph using priority queues? The standard implementation uses the disjoint set data structurel but I was curious if a PQ implementation is possible, and potentially even better in time complexity.

I looked it up online and found a PQ implementation for Prim's algorithm, but not for Kruskal's algorithm. Any help would be much appreciated. 
Reply all
Reply to author
Forward
0 new messages