线性表集合A=A B

大话数据结构

 1 void union(List *a, List Lb)
 2 {
 3     int La_len, Lb_len, i;
 4     ElemType e;
 5     La_len = ListLength(La);
 6     Lb~len = ListLength(Lb);
 7 
 8     for(i=1; i<=Lb=len; i++)
 9     {
10         GetItem(Lb, i, e);
11         if(!LocateElem(La, e, equal))
12             ListInsert(La, ++La_len, e);    
13     }
14 }

 

posted @ 2016-10-28 13:28  papering  阅读(162)  评论(0编辑  收藏  举报