- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第八章程序查找(The eighth chapter program search).doc
第八章程序查找(The eighth chapter program search)
8.4 application problems
The 1. order lookup time is O (n), the dichotomy search time is O (log2n), and the hash method is O (1). Why is there efficient search method, and the inefficient method is not abandoned?
[answer] different search methods have different scope of application, efficient search method is not in all cases than other search methods are more efficient, and not in all cases can be used.
2. pairs of N containing different elements of the set, while looking for the maximum and minimum elements at least how many comparisons?
[answer] n-1 times
[analysis] the variables Max and min are used to store the maximum element and the minimum element (location), and the first two elements are compared. The larger one is put into max, and the smaller one is put into min. From the beginning of second, each taking a first element and Max, if more than max to replace it with Max, and the end of the comparison; if less than max is compared with min, in the best case, it doesnt compare with min, so in this case, at least. N-1 comparison will find the maximum and minimum yuan yuan.
3. if the order table and unordered order table with n elements are searched sequentially, the average search length of the two in equal probability is discussed respectively in the following two cases:
(1) find unsuccessful, that is, no keyword in the table equal to the record of the given value K;
(2) find success, that is, the key in the table is equal to the record of the given value K.
[answer]
(1) n+1 comparisons are needed when unsuccessful
(2) the average success time was (n+1) /2 times
[parsing] when ordered and unordered tables are searched sequentially, n+1 comparisons are needed to determine the lookup failure. So the average search length is n+1. When looking for success, the average lookup length is (n+1) /2, and the ordered table and unordered table are the same. Because the order lookup is independent of the initial sequence state o
您可能关注的文档
- 毕业设计(论文)-洗瓶机的结构设计(全套图纸】.doc
- 新编大学英语第1册完整版教案(同名27558).doc
- 兰德商贸白酒事业部综合管理制度汇编.doc
- 勘察设计注册公用设备工程师-暖通空调及动力专业分类模拟题工程流体力学及泵与风机.doc
- 【精选】中国古建的一些名词解释.doc
- 世界海洋工程装备制造业发展报告(范本).doc
- 资本压力测试报告[6篇].doc
- 4专业技术人员内生动力与职业水平试卷及答案.doc
- 对开发商现金流丶盈利和净资产价值的压力测试.doc
- 造价工程师《土建工程》精选练习题1.doc
- 2023年12月江西九江市市民热线服务中心公开招聘话务员笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月江西遂川天然气有限公司客服专员公开招聘1人笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月杭州市上附外国语学校(民办)公开招聘5名优秀教育人才笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月新疆师范大学面向社会公开招聘20名事业编制中小学教师(第三批)笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月新疆生产建设兵团第十二师度面向社会公开招聘29名事业单位教育教师类岗位工作人员215笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月江苏扬州市公安局江都分局招考聘用巡防警务辅助人员24人笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月浙江宁波市江北区旅游协会1人笔试笔试历年典型考题及考点研判与答案解析.docx
- 电力设备行业研究报告.docx
- 2023年12月浙江丽水市体育运动训练中心招考聘用优秀退役运动员笔试笔试历年典型考题及考点研判与答案解析.docx
- 2023年12月江西省资溪县事业单位下半年公开招考高素质和短缺专业人才笔试笔试历年典型考题及考点研判与答案解析.docx
最近下载
- 【小红书运营】小红书KOS(KEY OPINION SALES)产品手册.pdf
- 设备采购 投标方案(技术方案).docx
- 创印染之美源艺术之趣——民间印染在幼儿园美术活动中的实践与研究-来源:中国校外教育(第2020020期)-中国儿童中心.pdf VIP
- 吾悦新员工入职培训(SSC大厅)考试试卷.doc VIP
- 如何提升小学生的阅读理解能力ppt课件-.ppt
- 科技英语语法_西安电子科技大学中国大学mooc课后章节答案期末考试题库2023年.docx
- 2023_2024学年安徽省合肥市七年级下册期末语文试题(附答案).pdf VIP
- 公路工程质量评定标准(2021年-2022年).doc VIP
- 2022-2023学年北京市朝阳区八年级(下)期末物理试卷及答案解析.pdf
- 在线网课知慧《中国书法艺术》课后章节测试答案.docx
文档评论(0)