java - union find disjoint set weighted quick union with path compression algorithm -
concerning question union find disjoint set , weighted quick union path compression algorithm
weighted quick-union path compression algorithm
does path compression affect iz[] array (array contain length of tree rooted @ i) ?
as far understood code, array iz[] represents amount of elements in given disjoint set. when compress path, don't modify number each set. thus, path compression not affect iz[] array.
Comments
Post a Comment