目录(点击即可跳转页面)
一.线性表
二、栈和队列
三、串
四、树&&森林
//
#include<cstdio>
#include<cstdlib>
#define ElemType int
#define LIST_INIT_SIZE 100 //存储空间的初始分配量
#define LISTINCREMENT 10 //存储空间的分配量增值
#define Status int
using namespace std;
//顺序表的结构 (存储元素的数组和长度)
typedef struct {
ElemType* elem; //存储空间基址
int length; //当前长度
int listsize; //当前分配的存储量 (单位是sizeof(ElemType))
}SqList;
//初始化顺序表,构造一个空的顺序表