正在加载图片...
The Disjoint Set ADT We will represent each set by a tree.Initially,each set contains one element. ■ The representation of the trees is easy,because the only information we will need is a parent pointer. Since only the name of the parent is required,we can assume that this tree is stored implicitly in an array: each entry Ai]in the array represents the parent of element i.If /is a root,then Ail=0.The Disjoint Set ADT ◼ We will represent each set by a tree. Initially, each set contains one element. ◼ The representation of the trees is easy, because the only information we will need is a parent pointer. ◼ Since only the name of the parent is required, we can assume that this tree is stored implicitly in an array: each entry P[i] in the array represents the parent of element i. If i is a root, then P[i]=0
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有