付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、。装。订。线。2011 年2012 年第 一 学期数据结构与算法分析时间共 120 分钟期末试卷 B 卷一、(10 分)Please translate the following termso Chi.abstract daype; stack; tree; sorting; recur; doublylinked list;dequeue; node; depth;balanced binary tree.二、(10 分)Please translate the following termso English.算法分析;尾指针;后进先出;推入栈;队尾;遍历;树根;层序;缩减增量排序;中位
2、数.三、(10 分)ni3 . PleaseHere is a simple program fragment to calculatealgorithm as carefully as you can.yze the time complexity of thisi1Sum(n )partialsum;partialsum=0;1234for(i = 1; i =n; i+ )Partialsum +=i*i*i;return partialSum;第 1 页 共 5 页得分阅卷人得分阅卷人得分阅卷人题号12345678910总分得分阅卷人四、(10 分)Describe informall
3、y as many (east two) algorithms assibletosolvetheSelectionProblem: Find the kth-largest number from a group of n numbers.五、(10 分)Describe what the following code does when started on the list consisting of 10, 9, 8, 7, 6, 5.template void removeEveryOtherItem( Container & lst )第 2 页 共 5 页得分阅卷人得分阅卷人ty
4、pename Container:iterator while( itr != lst.end( ) )itr = lst.erase( itr ); if( itr != lst.end( ) )+itr;itr=lst.begin();六、(10 分)(a) Write the order in which the nodes of the following tree are visited if preorder traversalis followed.What is the height of the tree?What is the depth of the node with
5、key 4?第 3 页 共 5 页得分阅卷人七、(10 分)Show the exprestree for the arithmetic expres(a + b) * (c + d * e) + h * f.八、(10 分)Exhibit an AVL tree with the fewest nodes of height 3.第 4 页 共 5 页得分阅卷人得分阅卷人九、(10 分)Show the result of inserting 2, 1, 4, 5, 9, 3, 6, 7o an initially empty AVL tree.十、(10 分)Shown below is
6、the code for some routine.template const Comparable & ?( vector & a,center = ( left + right ) / 2; if( a center a left )swap( a left , a center );if( a right a left )left,right)swap( a left , a right if( a right a center ) swap( a center , a right swap( a center , a rightreturn a right - 1 ;); );- 1 );What is
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年大学地理(气候学原理)试题及答案
- 2025年中职饲草栽培与加工(饲草品质提升技术)试题及答案
- 2025四川雅安石棉县佳业劳务派遣有限公司招聘石棉县应急救援指挥中心辅助人员1人备考题库及答案详解(考点梳理)
- 2026四川遂宁市船山区中医医院招聘备考题库及答案详解1套
- 《中国传统能源地区低碳转型》专题政策研究报告
- 云南省部分学校2025-2026学年七年级上学期第一次月考历史试题(含答案)
- 2024届河南省濮阳市范县高三下学期模拟测试(二)历史试题(含答案)
- 2026浙江丽水学院招聘(引进)高层次人才71人备考题库(2026年第1号)及答案详解参考
- 2025云南昆明市盘龙区人民政府滇源街道办事处公益性岗位招聘5人备考题库含答案详解
- 2026“梦工场”招商银行银川分行寒假实习生招聘备考题库及答案详解(夺冠系列)
- 产品供货方案、售后服务方案
- 十八而志梦想以行+活动设计 高三下学期成人礼主题班会
- 2023年上海华东理工大学机械与动力工程学院教师岗位招聘笔试试题及答案
- TOC供应链物流管理精益化培训教材PPT课件讲义
- 医院18类常用急救药品规格清单
- 放弃公开遴选公务员面试资格声明
- 2023-2024学年江苏省海门市小学语文五年级期末点睛提升提分卷
- GB/T 1685-2008硫化橡胶或热塑性橡胶在常温和高温下压缩应力松弛的测定
- 北京城市旅游故宫红色中国风PPT模板
- DB42T1319-2021绿色建筑设计与工程验收标准
- 经济学原理 第一章课件
评论
0/150
提交评论