Let G = (V, E, w) be a weighted undirected graph. Let U be asubset of V , such that G[V – U] is…

Let G = (V, E, w) be a weighted undirected graph. Let U be asubset of V , such that G[V − U] is connected. Design an algorithmto find a minimum spanning tree of G in which all vertices in U areleaves. Note that the spanning tree may have other leaves, but theweight of the tree should be minimized.(pseudo C code)