python:实现并查集
class UnionFindSet(object):
def __init__(self, nodes):
# 记录每个节点的父节点
self.fatherMap = {
class UnionFindSet(object):
def __init__(self, nodes):
# 记录每个节点的父节点
self.fatherMap = {