Question 1: Given a connected undirected graph with n vertices and m edges, assume that a minimum spanning tree (MST) only includes edges from the first k edges in sorted order, i.e., if you sort the edges in increasing order of weight, then edges of the MST are among the first k edges. Now, assume that you have already built a priority queue of the edges in O(m) time. Assume that the priority queue supports an operation extract(), which returns and removes the minimum edge. You can determine the size of the priority queue using the size() operations.
1 There is a way to build a priority queue in linear time; we haven't discussed it in class.
Provide a pseudo-code to find a minimum spanning tree of the graph in O(klog n) time after the priority queue is built. You must clearly state what additional data structures you use and how you use them. Your pseudo-code must be clear enough so that one can implement it given the knowledge of the data structures. You do not need to write pseudo-code for the operations of the data structures that you use; just calling them is good enough. [15]