![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
实现集合并集
qq_26883101
这个作者很懒,什么都没留下…
展开
-
线性表的操作 (1)实现 A= A U B
/* LA和LB分别表示两个集合(现在要求一个新的集合 A = A U B) LA = {1,2,3,4} LB = {2,3,4,5}*/ #include #include #include #define LIST_INIT_SIZE 10 //线性表存储空间的初始分配量 #define LISTINCREMENT 2 //线性表存储空间的分配增量 typedef struct原创 2016-05-13 23:24:53 · 547 阅读 · 0 评论 -
线性表的操作 (2.1) C = A U B
//操作结果 C = AUB #include #include #include #define LIST_INIT_SIZE 10 //动态内存的初始分配量 #define LISTINCREMENT 2 typedef struct SqList { int *elem; int length; int listsize; }SqList; bool InitList(原创 2016-05-16 13:13:06 · 333 阅读 · 0 评论 -
线性表的操作 (2.2) C = A U B
//线性表的操作 实现 C = A U B //A = {1,2,3,4} B = {2,4,6,8} 则 C = {1,2,2,3,4,4,5,6,8} #include #include #include #define LIST_INIT_SIZE 10 #define LISTINCREMENT 2 typedef struct SqList { int *elem; in原创 2016-05-16 14:27:38 · 497 阅读 · 0 评论 -
1.2链式结构 实现 C = A U B
// 链式结构 实现 C = AUB #include #include #include typedef struct Node { int data; struct Node *next; }*LinkList; bool InitList(LinkList *L); //创建空链表 bool ListInsert(LinkList L,int pos,int e); //在链表原创 2016-05-17 13:02:58 · 659 阅读 · 0 评论