A union-find data structure called Partition