单向循环链表的基本操作
1、头文件(clist.h)
#pragma once
//循环链表
typedef struct CNode
{
int data;
struct CNode *next;
}CNode,*CList;
//循环链表初始化
void InitList(CList plist);
//头插
bool Insert_head(CList plist,int key);
//尾插
bool Insert_tail(CList plist,int key);
//查找
CNode *Search(CList plist,int key);
//删除
bool Delete(CList plist,int key);
//获取循环链表长度(数据结点的个数)
int GetLength(CList plist);
//判空
bool IsEmpty(CList plist);
//清空
void Clear(CList plist);