Challenge: Find the Minimum Spanning Tree of the Given Graph

Given an undirected weighted graph, find its minimum spanning tree.

Problem Statement

Implement a function that returns the Minimum Spanning Tree of the given graph.

Input

An undirected weighted graph

Output

A possible minimum spanning tree

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.