TEKsystems Interview Question

MST conversion from graph