Added UnionFindWeightedTree with tests