Finished! Tried many cases. Didnt make use of all the functions from
WeightedQuickUnion.