I am trying to implement the Kruskal algorithm. I understand how the algorithm work on the paper but when I try to code it I don't know how to implement the function. Here is some code that I tried to implement. https://code.sololearn.com/ch9x3FbrGxE4/#cpp . I will appreciate if someone can help me understanding how to implement it in c++.