Basically what im trying to do, is open data-for-union-find.txt which ash the following format:
T
X Y
X Y
X Y
X Y
.
.
.
I have to open the file and read from it the 2 sets X and Y and do their union find. The Union find concept is till a bit foggy as i dont fully understand what to do. I get no error while building, but i get no output other then "Press any key to continue ...".
Any thoughts about what to do? As I only really need to know the number of disjoint sets.