
Data Structure
yunxiaoMr
where there great love,there are always miracles!Just work hard and be yourself, and then you will succeed!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
第0周笔记1-顺序表(一):绪论 顺序表常规操作函数说明
顺序表常规操作: (1)初始化线性表CreatList(&L):构造一个空的线性表L (2)判线性表是否为空表ListEmpty(L):若L为空表,则返回真,否则返回 (3)求线性表的长度ListLength(L):返回L中元素个数 (4)输出线性表DispList(L):当线性表L不为空时,顺序显示L中各节点的值域 (5)求线性表L中指定位置的某个数据元素GetElem(L,i...原创 2019-07-18 22:16:00 · 269 阅读 · 0 评论 -
第0周笔记2-顺序表(二):CreatList(&L)、ListEmpty(L)、ListLength(L)、disList(L)、GetElem(L,i,&e)、locateElem(L,e)
#include<iostream> #include<malloc.h> using namespace std; #define Maxsize 50 typedef int ElemType; typedef struct { ElemType data[Maxsize]; int length; }sqList; //函数声明 void CreatList(s...原创 2019-07-18 22:22:52 · 5387 阅读 · 0 评论 -
第0周笔记3-顺序表(三):ListInsert(&L,i, &e)、ListDelete(&L, i, &e)、DestroyList(&L)
#include<iostream> #include<malloc.h> using namespace std; #define Maxsize 50 typedef int ElemType; typedef struct { ElemType data[Maxsize]; int length; }sqList; //函数声明 void CreatList(s...原创 2019-07-18 22:46:39 · 5389 阅读 · 0 评论 -
第0周笔记4-顺序表(四):A与B的并集(应用)
//核心思想 void union_AB(sqList *&La,sqList *Lb){ int La_len = ListLength(La); int Lb_len = ListLength(Lb); for(int i=1;i<=Lb_len;i++){ int e; GetElem(Lb,i,e); if(locateElem(La,e)<0){ ...原创 2019-07-18 23:10:05 · 270 阅读 · 0 评论