I have implemented the kruskal's algorithm in c++ in LEDA library. So, i stored in a linked list the edges that belong to a MST, and those that are not . So, i wanna make a checker program that checks if the edges are rigth, by checking if the MST cycle property is applied in my tree. I have to make this program with LEDA's dynamic trees. But my overall question is : If i have these edges:
`u1-u2
u3-u5
u2-u3
...`
How can I order them so that they are continues , like:
u1-u2
u2-u3
u3-u5