- 1、本文档共101页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据结构 1.1、什么是数据结构 1.2、基本概念和术语 1.3、算法的描述和分析 1.1、什么是数据结构 旅游交通网络图 1.2 基本概念和术语 高级程序语言中如何描述存储结构 “一维数组”类型描述顺序存储结构 “指针”类型描述链式存储结构 1.3 算法的描述和分析 一、算法 二、算法的特性 三、算法设计的原则 四、算法效率的衡量方法和准则 五、算法的存储空间需求 六、算法的描述 七、类C语言语法概要 八、算法的评价 八、算法的评价 1、执行算法所耗费的时间,即时间复杂度。 T(n)=O(f(n)) 2、执行算法所耗费的存储空间,其中主要考虑辅助存储空间的大小,即空间复杂度。记作 S(n)=O(f(n))其中,n为问题的规模(或大小)。 3、算法是否易读、是否容易转换成任何其它可运行的语言编制的程序以及是否易被测试等等。 若输入数据所占空间只取决于问题本身,和算法无关,则只需要分析除输入和程序之外的辅助变量所占额外空间。 若所需额外空间相对于输入数据量来说是常数,则称此算法为原地工作。 若所需存储量依赖于特定的输入,则通常按最坏情况考虑。 ALGORITHM ANALYSIS 【Definition】An algorithm is a finite set of instructions that, if followed, accomplishes a particular task. In addition, all algorithms must satisfy the following criteria: (1) Input There are zero or more quantities that are externally supplied. (2) Output At least one quantity is produced. (3) Definiteness Each instruction is clear and unambiguous. (4) Finiteness If we trace out the instructions of an algorithm, then for all cases, the algorithm terminates after finite number of steps. (5) Effectiveness Every instruction must be basic enough to be carried out, in principle, by a person using only pencil and paper. It is not enough that each operation be definite as in(3); it also must be feasible. Note: A program is written in some programming language, and does not have to be finite (e.g. an operation system). An algorithm can be described by human languages, flow charts, some programming languages, or pseudo-code. 〖Example〗 Selection Sort: Sort a set of n ? 1 integers in increasing order. From those integers that are currently unsorted, find the smallest and place it next in the sorted list. Where and how are they stored? Where? for ( i = 0; i n; i++) { Examine list[i] to list[n?1] and suppose that the smallest integer is at list[min]; Interchange list[i] and list[min]; } Sort = Find the smallest integer + Interchange it with list[i]. Algori
您可能关注的文档
- 首印影视公司简介教案分析.ppt
- 深圳市企业投资者联合会教案分析.ppt
- 寿险公司考核体系比较教案分析.ppt
- 寿险公司人力资源管理教案分析.ppt
- 寿险团队经营攻略教案分析.ppt
- 深圳移动管道施工规范教案分析.ppt
- 什么叫能力教案分析.ppt
- 什么时候应该更换机油车主都应该过来看看教案分析.ppt
- 寿险意义与功用完整版本89页教案分析.ppt
- 什么时候语文教案分析.ppt
- 专卖店促销员销售与成交技巧培训课件(34P).pptx
- 红色商务风新员工入职销售技巧知识培训课件(34P).pptx
- 专卖店商场销售员销售与成交技巧培训课件(34P).pptx
- 小区物业保安法律知识培训课件(28P).pptx
- 专卖店销售员轻松成交技巧培训(34P).pptx
- 轻松成交客户新员工入职通用销售技巧知识培训(34P).pptx
- 2024年初级《银行业法律法规与综合能力》考前必刷必练题库500题(含真题、必会题).docx
- 2024年“新安法知多少”知识竞赛题库及答案(最新版).docx
- 2024年30秒毕业生面试工作自我介绍.docx
- 2024年《医务人员礼仪培训》心得体会.docx
文档评论(0)