Microsoft interview question

Implement krushkal algorithm for mst