![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线性表的顺序存储结构
白莲居仙
change the world by program!
展开
-
小白莲的数据结构day01
线性表顺序存储结构的基本操作1 1.构建线性表 //包含头文件 #include<stdio.h> #include<stdlib.h> //定义结构常量 #define OK 1 #define ERROR -1 #define OVERFLOW -2 #define LIST_INIT_SIZE 20 //线性表初始分配的存储空间大小 #define LISTINCR...原创 2019-09-27 20:20:55 · 202 阅读 · 0 评论 -
小白莲的数据结构day02
对线性表(顺序结构)的删除、插入、合并操作 1.线性表的删除操作 //创建一个删除线性表第i个元素的函数 //删除第i个元素,用e返回其值,表长减一 Status DeleteElem(SqList& L, int i, ElemType &e) { //判断i的合法性(i>L.length 包含对线性表是否为空的判断) if (i<0 || i>L.leng...原创 2019-09-28 16:04:29 · 134 阅读 · 0 评论