A union/find data structure is a data structure used for maintaining a partition of a set.