union-find (hackage): The Union/Find algorithm implements these operations in (effectively) constant-time:  Check whether two elements are in the same equivalence class.  Create a union of two equivalence classes.  Look up the descriptor of the equivalence class.
Keywords: algorithms|bsd3|data|library