线性表——顺序表
1.顺序表定义(1)静态创建#define MaxSize 50typedef struct{ int data[MaxSize]; int length;}SqList;(2)动态创建#define InitSize 100typedef struct{ int *data; int MaxSize, length;}seqlist;2.顺序表初始化(1)静态初始化void InitList(SqList &L){ L.length = 0;}
原创
2021-07-27 13:53:53 ·
91 阅读 ·
0 评论