When merging two components in a disjoint-set data structure, attach the representative of the smaller component to that of the larger one. Each time an element's depth increases its component size at least doubles, so its depth is logarithmically bounded even before path compression is applied.

There are no discussions about this article yet.

Articles by others on the same topic (NaN)

There are currently no matching articles.