- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
程序设计与算法基础(2) 潘爱民 2006/9/25 提纲 基本数据结构——list 基本数据结构——stack 基本数据结构——queue list 单链表(singly linked list) 双链表(doubly linked list) List的性质 在两端插入元素非常快速、简单 查找中间元素效率不高 SkipList 查找过程 构造和维护过程 * 建议对p2p技术有兴趣的同学看一看SkipNet List的广泛应用 从系统底层,到应用层的数据管理 系统层: 内核对象的管理 动态数据块的管理 应用层: 稀疏表格(矩阵) 各种纪录信息 List的一个实现 DDK中单链表的定义 typedef struct _SINGLE_LIST_ENTRY { struct _SINGLE_LIST_ENTRY *Next; } SINGLE_LIST_ENTRY; DDK中双链表的定义 typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } LIST_ENTRY; stack stack: a linear data structure, it can be accessed only at one of its ends for storing and retrieving data. The last entry put in the stack is the first entry removed from the stack. —— LIFO(Last in/first out,后进先出) Stack is like a special container, a stack of trays in a cafeteria: New trays are put on top of the stack The trays are taken off just from the top of the stack, not from the middle or the bottom of the stack Stack: C function calls how to implement function calls in C? C function calls Stack frame or activation record Before entering a function, the caller stores the specific state info into a stack frame, and resume the state after the function finishes. If all stack frames are put into a container, the stack frame retrieved at the time of resuming the caller’s state is the one put recently —— LIFO Stack can be used to implement the function calls The stack frame in C function calls Delimiter Matching in C expression S=t[5]+u/(v*(w+y)) Output pairs (u,v) such that the left delimiter at position u is matched with the right delimiter at v. (3,5) (9,17) (12,16) (a+b))*((c+d) right parenthesis at 4 has no matching left parenthesis (7,11) left parenthesis at 6 has no matching right parenthesis Delimiter Matching scan expression from left to right when a left delimiter is encountered, add its position to the stack when a right delimiter is encountered, remove matching position from stack Example S=t[5]+u/(v*(w+y)) Example S=t[5]+u/(v*(w+y)) Example S=t[5
您可能关注的文档
最近下载
- 三级养老护理员国家职业技能培训模块一项目三任务四协助老年人进行氧气吸入.pptx VIP
- 健康教育-健康生活课件.ppt
- 三级养老护理员国家职业技能培训模块一项目三任务三协助老年人进行口腔吸痰.pptx VIP
- 职业道德与法律合规培训课件.pptx VIP
- 铝电解质炭渣资源化洁净焙烧原理及应用研究.docx VIP
- 三级养老护理员国家职业技能培训模块一项目三任务二协助老年人进行雾化吸入.pptx VIP
- 法律合规培训.pptx VIP
- 2025-2026学年小学美术冀美版2012六年级上册-冀美版(2012)说课稿合集.docx
- 空分安全生产标准规范合规指引 .pdf VIP
- 心理疏导心理健康开学第一课46.pptx VIP
文档评论(0)