Add IEV
Add TREE

Tree was solved in an indirect manner using sets. I generate
a set for each edge and continue joining intersecting sets
until I have all the components of the graph. After this you
need components - 1 edges to connect the graph.