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.
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.