- 15
- 0
- 约5.51万字
- 约 8页
- 2018-01-10 发布于湖北
- 举报
[教学设计]数据结构算法经典 -单循环链表
数据结构算法经典 -单循环链表
# define null 0
typedef char ElemType;
typedef struct Circular
{
ElemType data;
struct LNode *next;
};
setnull(struct Circular **p)
{
*p=null;
}
int length (struct Circular **p)
{
int n=0;
struct Circular *q=*p;
while (q!=null)
{
n++;
q=q-next;
}
return(n);
}
ElemType get(struct Circular **p,int i)
{
int j=1;
struct Circular *q=*p;
while (jiq!=null)
{
q=q-next;
j++;
}
if(q!=null)
return(q-data);
else
printf(position parameter is incorrect!\n);
}
int locate(struct Circular **p,ElemType x)
{
int n=0;
struct Circular *q=*p;
whi
您可能关注的文档
- [PPT]公路工程施工安全管理培训()ppt..ppt
- [业务]网上单证介绍.doc
- [中学联盟]陕西省宁陕县城关初级中学人教版七年级下册数学课件:第五章相交线与平行线复习课件.ppt.ppt
- [中学联盟]河北省邢台市隆尧县尧山中学成龙校区河大版七年级上册语文课件:第14课 春 (共21张PPT).ppt.ppt
- [优质文档]急危重症挽救流程.doc
- [分享]初中英语写作校本课程开辟计划.doc
- [分享]动物解剖学及组织胚胎学复习资料.doc
- [初三理化生]2011年中考化学试题汇编——《酸、碱、盐》word版_附答案.doc
- [原创]电大法学本科证据学答案 最新.doc
- [定稿]用PDF文档制作特色文献全文数据库的实践-管理论文-论文中心.doc
原创力文档

文档评论(0)