Whats the best algorithm for Non Disjoint Set Union?
问题 Lets say there are two (non disjoint) sets of points (cartesian space), what is the best case complexity algorithm to perform the union of the two sets ? 回答1: Since the point coordinates are arbitrary and there is no special relation between them, I don't see this problem as a geometric specific problem. It is the generic problem of efficiently merging S1 and S2 into a new set S. I know about two options: 1) When the sets are stored in a hash table (actually a hash set), the union takes O(|S1