小白專場: File Transfer--集合的簡化表示,按秩歸併與路徑壓縮

集合的簡化表示 原始的集合表示: typedef struct { ElementType Data; int Parent; } SetType; int Find(SetType S[], Elemtype X) { //在數組S中查找值爲X的元素所屬的集合 //MaxSize是全局變量,爲數組S的最大長度 int i; for (i = 0; i < MaxSize && S[i].
相關文章
相關標籤/搜索