1 Star 0 Fork 0

CoderQi/cg初学

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Seqlist1228.h 822 Bytes
一键复制 编辑 原始数据 按行查看 历史
CoderQi 提交于 2022-12-28 21:02 +08:00 . 顺序表实现
#pragma once
#define N 100
#include<stdio.h>
#include<stdlib.h>
//静态
//typedef int sldatatype;
//
//typedef struct seqlist
//{
// sldatatype a[N];
// int size;//存储了多少个数据
//}sl;
////接口
//void seqlistinit(sl* ps, sldatatype x);
//void seqlistpushback(sl*ps, sldatatype x);//尾插
//void seqlistpopback(sl* ps);//尾删
//void seqlistpushfront(sl* ps, sldatatype x);//头插
//void seqlistpopfront(sl* ps);//头删
typedef int sldatatype;
typedef struct seqlist
{
sldatatype* a;
int size;//存储了多少个数据
int capacity;//数组实际能存多大
}SL;
//接口
void seqlistinit(SL* ps);
void seqlistpushback(SL* ps, sldatatype x);//尾插
void slprint(SL* ps);
void seqlistpopback(SL* ps);//尾删
void seqlistpushfront(SL* ps, sldatatype x);//头插
void seqlistpopfront(SL* ps);//头删
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/programmercg/cg-beginner.git
git@gitee.com:programmercg/cg-beginner.git
programmercg
cg-beginner
cg初学
master

搜索帮助