TEKsystems interview question

MST conversion from graph