



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第 1 页页 共 4 页页 中 山 大 学 软 件 学 院 软 件 工 程 专 业 2010 级 2011 学年秋季学期 SE 203 数 据 结 构数 据 结 构 与 算 法与 算 法 期 末 试 题 期 末 试 题 B 卷卷 考 试 形 式 考 试 形 式 闭闭 卷卷 考 试 时 间考 试 时 间 2 小小 时时 中山大学授予学士学位工作细则 第六条 中山大学授予学士学位工作细则 第六条 考 试 作 弊 不 授 予 学 士 学考 试 作 弊 不 授 予 学 士 学 位位 方向 方向 姓名 姓名 学号 学号 说明 说明 答案答案一律一律写写在答题纸在答题纸上上 且夹在 且夹在试试卷卷里里一起交一起交还还给给监考老师监考老师 I Selection with only one choice 每小题每小题 2 分 共分 共 30 分分 1 In the perspective of physical structure we can classify data structures into A Dynamic structure and static structure B Internal structure and external structure C Contiguous structure and linked structure D Compact structure and non compact structure 2 In computer science the time complexity is one of important properties of algorithms If the time complexity of algorithm A for problem B is O 1 it means that A Algorithm A can solve problem B with 1 step B Algorithm A spends 1 second to solve problem B C Algorithm A can solve problem B with constant steps D Algorithm A can solve problem B with nondeterminisitc steps 3 Class stack is a contiguous stack and its elements are stored in array entry N If the Top index of the stack is assigned 1 by constructor how many elements has the stack at any time A Top B Top 1 C Top 1 D N 4 Given a contiguous list with length n the time complexity of locating a given position i 0 i n 1 is A O 1 B O i C O logn D O n 5 Suppose the sequence of data that is pushed into a stack is 1 2 3 4 Which of the following sequence that is poped from the stack is impossible A 1 2 3 4 B 2 1 4 3 C 2 3 1 4 D 4 1 3 2 6 Suppose we use an array with length MaxQ to implement a circular queue the rear and front point the tail and front element respectively How many elements are there in the circular queue A rear front B rear front 1 C rear front 1 MaxQ D rear front 1 MaxQ MaxQ 第 2 页页 共 4 页页 7 Which of the following statements about strings is correct A A string is a sequence of characters B An empty string is composed of space characters 空格 C A string can only be stored in sequential structures e g arrays D If we want to get a real 123 5 the input 123 5 is only the real not a string 8 Assume the infix form 中缀形式 of an arithmetic expression is A B C D E and the postfix form 后缀形式 is ABC DE What is the prefix form 前缀形式 of this expression A A B C DE B A BC DE C CD ABE D AB CDE 9 Let undirected graph G V E be stored with adjacency matrix 邻接矩阵 where V is set of vertices and E is the set of edges If vi vj E vi vj How many zeros are there in the adjacency matrix A V 2 2 E B V 2 E C 2 E D E 10 The lower bound of sorting a sequence based on comparison with n elements is A O 1 B O logn C O n D O nlogn 11 Which of the following constraint condition must AVL tree satisfy where TL and TR are the left and right subtrees respectively and H T is the height of binary tree T A H TL H TR 1 B H TR H TL 1 C H TL H TR 1 D H TL H TR 1 12 Suppose that the levels of nodes in a binary tree count from 0 the levels of children of a node at ith level are i 1 For example the level of the root of the binary tree is 0 the levels of children of the root is 1 How many nodes are there at most at kth level A 2k B k2 C 2k D k 13 For the following sorting algorithms which time complexity is O n 2 in the worst case A Head Sort B Quick Sort C Merge Sort D Radix Sort 14 For the following operations which can the queue not do it A Save the last element B Remove the last element C Get the first element D Remove the first element 15 Suppose that an array Data 0 N 1 is a heap Which is the left child of Data k k N 2 A Data k 1 2 B Data k 1 C Data 2k 1 D Data 2k 2 II Questions and Answers 每小题每小题 15 分 共分 共 45 分分 1 In the following sequence of keys insert the keys in the order shown to build them into an AVL tree please draw the illustration figures for the whole procedure A T G S H N 第 3 页页 共 4 页页 E A B F D C 2 1 Give the adjacency matrix for the following undirected graph 2 Suppose that the graph traversal start at vertex A write the order of vertices visited and draw the traversal tree under Depth First traversal The nodes that is adjacency to the same node are visited in alphabetical order 同与一个结点相邻的结点按字母序的顺序进行访问 3 Describe QuickSort algorithm briefly and show each step for sorting the following data into ascending sequence 升序 by QuickSort algorithm Suppose that the first element is pivot Seven unsorted data 4 6 3 2 1 5 7 III Programming 共共 25 分分 1 Given a class of Binary Search Tree declared as follows 10 分 template struct Binary node some member functions are neglected since they will not be used here Record data Binary node left Binary node right template class Search tree public some member functions are neglected since they will not be used here Error code tree search Record Binary node found search for node root target if found NULL result not present else target found data return result 第 4 页页 共 4 页页 private Binary node root search for node Binary node sub root const Record Implement the function search for node Binary node sub root const Record struct Node next Node int key Node Next NULL Key key next Next class Set public void operator const Set int Counter private Node Head Write programs for opera
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年干细胞治疗神经系统疾病临床应用临床研究国际合作模式探讨报告
- 2025年教育产业并购整合策略研究:投资趋势与市场机遇报告
- 2025年工业互联网平台架构在汽车制造行业的应用与智能化升级报告
- 建设高新智能装备制造基地项目可行性研究报告模板-立项拿地
- 2025年军训日记题目及答案
- 初中生使用手机协议范文10篇
- 吃药医生考试题及答案
- 2025年n3护士考试试题含答案2025年定考版
- 公安开关自愿调解协议书7篇
- 2025年河北省辅警招聘考试题库及答案
- 家长进课堂金融知识讲座
- 高警示药品管理考试
- 国家开放大学(中央电大)报名登记表(附填写说明)
- JCT2425-2017 坐便器安装规范
- 四年级名人名言80句
- 非遗文化创意产品设计 课件全套 第1-5章 概述- 非遗文创产品设计案例解析
- 西门子数控系统调试
- RB/T 089-2022绿色供应链管理体系要求及使用指南
- 电子护理文书书写规范
- 经济法说课稿
- 2023年河南专升本英语真题及答案解析
评论
0/150
提交评论