⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 seqlist.h

📁 有关队列的排序问题
💻 H
字号:
#ifndef SEQLIST_H
#define SEQLIST_H

const int List_Init_Size=100;
const int  ListIncrement=10;

typedef int ElemType;
const int EndMark=0;

typedef struct
{
	ElemType* elem;//存储空间基址
	int length;//当前长度
	int listsize; //当前分配的存储容量(以sizeof(ElemType)为单位)
} Sqlist;

void InitList_sq(Sqlist& l);//构建一个链表
void DestroyList_sq(Sqlist& l);//销毁
void ClearList_sq(Sqlist& l);//清空
bool ListEmpty_sq(Sqlist l);
int ListLength_sq(Sqlist l);//链表长度
void GetElem_sq(Sqlist l, int i, ElemType& e);//取链表中的一元素
int LocateElem_sq(Sqlist l, ElemType e);//找一个为e的元素
void PriorElem_sq(Sqlist l, ElemType cur_e, ElemType& Pre_e);//前驱
void NextElem_sq(Sqlist l, ElemType cur_e, ElemType& Next_e);//后继
void ListInsert_sq(Sqlist& l, int i, ElemType e);//插入 
void ListDelete_sq(Sqlist&l, int i, ElemType& e);//删除
void ListTraverse (Sqlist L);//
bool compare(ElemType x,ElemType y);//比较

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -