Amazon Interview Question

Minimum spanning tree and another graph related problem