2013年4月23日

静态链表

摘要: #include<iostream.h>#define OK 1#define OVERFLOW -2#define ERROR 0typedef int Status;typedef char ElemType;const int MaxSize=11; //静态链表大小typedef struct node{ //静态链表结点 ElemType data; int cur;}SNode,SLinkList[MaxSize];void Visit_SL(SLinkList,int);//int Unused;//空闲静态链表头指针void In... 阅读全文

posted @ 2013-04-23 21:51 绕指柔yy 阅读(150) 评论(1) 推荐(0) 编辑

合并两个非递减链表

摘要: #include<iostream.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define OK 1#define OVERFLOW -2#define ERROR 0typedef int Status;typedef int ElemType;typedef struct LNode{ ElemType data; //数据域 struct LNode *next; //指针域}LNode,*LinkList;Status InitList_L(LinkList &L){... 阅读全文

posted @ 2013-04-23 21:50 绕指柔yy 阅读(256) 评论(0) 推荐(0) 编辑

链表的表示与实现

摘要: #include<iostream.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define OK 1#define OVERFLOW -2#define ERROR 0typedef int Status;typedef int ElemType;typedef struct LNode{ ElemType data; //数据域 struct LNode *next; //指针域}LNode,*LinkList;Status InitList_L(LinkList &L){... 阅读全文

posted @ 2013-04-23 21:49 绕指柔yy 阅读(180) 评论(0) 推荐(0) 编辑

调整顺序表A,使其左边的所有元素均小于0,使其右边的所有元素均大于0

摘要: #include<iostream.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define OK 1#define OVERFLOW -2#define ERROR 0typedef int Status;typedef int ElemType;typedef struct{ ElemType *elem; int length; //当前长度 int listsize; //当前分配的存储容量}SqList;Status InitList_Sq(SqList &L){ //构... 阅读全文

posted @ 2013-04-23 21:48 绕指柔yy 阅读(517) 评论(0) 推荐(0) 编辑

将顺序表A逆置,只允许在原表的存储空间外,再增加一个附加的工作单元

摘要: #include<iostream.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define OK 1#define OVERFLOW -2#define ERROR 0typedef int Status;typedef int ElemType;typedef struct{ ElemType *elem; int length; //当前长度 int listsize; //当前分配的存储容量}SqList;Status InitList_Sq(SqList &L){ //构... 阅读全文

posted @ 2013-04-23 21:47 绕指柔yy 阅读(205) 评论(0) 推荐(0) 编辑

将两个有序顺序表A和B归并为一个有序顺序表C

摘要: #include<iostream.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define OK 1#define OVERFLOW -2#define ERROR 0typedef int Status;typedef int ElemType;typedef struct{ ElemType *elem; int length; //当前长度 int listsize; //当前分配的存储容量}SqList;Status InitList_Sq(SqList &L){ //构... 阅读全文

posted @ 2013-04-23 21:45 绕指柔yy 阅读(820) 评论(0) 推荐(0) 编辑

顺序表的表示与实现

摘要: 1 #include<iostream.h> 2 #include<stdlib.h> 3 #define LIST_INIT_SIZE 100 4 #define OK 1 5 #define OVERFLOW -2 6 #define ERROR 0 7 typedef int Status; 8 9 typedef int ElemType; 10 typedef struct 11 { 12 ElemType *elem; 13 int length; 14 int listsize; 15 }SqList; 16 ... 阅读全文

posted @ 2013-04-23 21:43 绕指柔yy 阅读(268) 评论(0) 推荐(0) 编辑

我的IT博客开通了

摘要: 哈哈,终于有了IT博客了 阅读全文

posted @ 2013-04-23 21:36 绕指柔yy 阅读(90) 评论(0) 推荐(0) 编辑

导航