- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
数据结构线性表(Data structure linear table)
数据结构线性表(Data structure linear table) 1.线性表 # includes stdio.h # includes stdlib.h # define maxsize 100 typedef struct node { int date [maxsize]; int length; } seqlist, * pseqlist; pseqlist _ seqlist init () { pseqlist pl; pl = (pseqlist) malloc (sizeof (seqlist)); if (pl) pl - length = 0; return (pl). } int length _ seqlist (seqlist l) { return (l.length); } int location _ seqlist (seqlist l, int x) { int i = 0; if (i l.length l.data []. = x) the + +; if (i = l.length) return 0; else return (i + 1). } int insert _ seqlist (pseqlist pl, int i, int x) { int j; if (! pl) { printf (表不存在); return (- 2). } if (pl - length = maxsize) { printf (表溢出); return (- 1). } if ( 1 | | pl - length + 1) { printf (插入位置不合理); return (0); } for (j = pl - length - 1; j = 1; j -) pl - date [j + 1] = [j] pl - date. pl - date [- 1] = x; pl - length + +; return (1); } int delete _ seqlist (pseqlist pl, int i) { int j; if (! pl) { printf (表不存在); return (0); } if ( 1 | | pl - length) { printf (删除位置不合理); return (0); } for (j = i; j - pl - length; j + +) { pl - date (j - 1] = [j] pl - date. } pl - length - -; return (1); } void main () { int i; pseqlist pl; seqlist l; pl = l; l.length = 10; printf (请输入: \ n); for (i = 0; i l.length; i + +) scanf (% d, l.data []); delete _ seqlist (pl, 5); insert _ seqlist (pl, 6.7). for (i = 0; i l.length; i + +) printf (% d, l.data []); } 2.单链表 # includes stdio.h # includes stdlib.h typedef struct node { int date; struct node * next; } lnode, * linklist; linklist created _ linklist () { linklist h; h = (linklist) malloc (sizeof (lnode)); if (h) h - next = null; return h; } void destory _ linklist (linklist * h) { linklist p, q; p = * h; if (p) { q = p; p = p - next; free (q). } * h = null; } int length _ linklist (linklist h) { linklist p; int count = - 1; p = h; while (p) { count + +; p = p - next; } return count; } linklist locate _ linklist (linklist h, int i) { linklist p = h; int j = 0; while (p j i) { p = p - next; j
您可能关注的文档
- 循环答案(Loop answer).doc
- 循环开挖(Cyclic excavation).doc
- 循环系统4(Circulatory system 4).doc
- 微利时代渠道战略突围(Profit age, channel strategy, breakthrough).doc
- 微博经典语录荟萃,值得珍藏!!(上)(Micro-blog classic quotations, worthy of collection!).doc
- 心动的话(Heart stirring words).doc
- 心律失常的临床治疗(Clinical treatment of arrhythmia).doc
- 心悸简析及治疗(Brief analysis and treatment of palpitation).doc
- 心电图入门(Introduction to ECG).doc
- 心电图机操作规程(Procedures for the operation of electrocardiograph).doc
- 数据结构试题及答案3(Data structure, questions and answers 3).doc
- 数据结构顺序线性表的操作(Operation of data structure sequential linear table).doc
- 数据结构顺序线性表(Data structure sequential linear table).doc
- 数据计算机网络知识(Data, computer, network knowledge).doc
- 数据验证(data validation).doc
- 数控机床校准技术在广东先进制造业中的作用(The role of numerical control machine tool calibration technology in Guangdong advanced manufacturing industry).doc
- 数控机床维修技术分析(Maintenance technology analysis of NC machine tools).doc
- 数控维修(NC maintenance).doc
- 数控设备日常维护保养(Daily maintenance of numerical control equipment).doc
- 数控车代码(NC code).doc
最近下载
- 《装配式多层混凝土墙板建筑技术规程》.pdf VIP
- 建设工程造价咨询业务指导规程.docx VIP
- 监狱电网工程施工方案(3篇).docx
- 2025年中国婴儿纸尿裤市场调查研究报告.docx
- 鼎捷ERP全套操作参考手册.doc VIP
- 牛津译林六上Unit 3 Holiday fun Cartoon time课件.ppt VIP
- 「备战2024高考语文」重点古诗文篇目默写复习:《谏太宗十思疏》理解性默写精选.docx VIP
- 2025年秋必威体育精装版人教版七年级上册英语单词默写版 .pdf VIP
- 普通高中语文课程标准(2017年版2020年修订).pdf VIP
- 教育事业发展“十五五”规划.docx
文档评论(0)