2011《数据结构》期末试卷_A卷(答案)

2011《数据结构》期末试卷_A卷(答案)
2011《数据结构》期末试卷_A卷(答案)

厦门大学《_数据结构_》课程期末试卷

信息科学与技术学院计算机科学系2009年级___专业

主考教师:陈怡疆庄朝晖试卷类型:(A卷)

一、(本题10分)

(1)线性表和广义表的主要区别是什么?

(2)已知广义表:C=(a,(b,(a,b)),((a,b),(a,b))),则tail(head(tail(C)))=?

答案:

(1)线性表和广义表都是元素a1,a2,…,an组成的序列,其主要区别点在于:在线性表中,ai是单个元素(原子);在广义表中,ai可以是单个元素(原子),也可以是广义表。(7分)(2)tail(head(tail(C)))=((a,b))(3分)

二、(本题10分)简述二叉树的两种存储结构(顺序存储和链式存储)的数据结构及主要优缺点。在哈夫曼树中,使用哪种存储结构,并说明理由。

答案:

顺序存储结构:typed efSqBiTree[Max_Tree_Size];

特点:使用数组存储二叉树上的结点元素,按照对应的完全二叉树的编号来存储二叉树。优点是适用于完全二叉树,访问方便。缺点是对于一般二叉树,较大地浪费了空间。(4分)

链式存储结构:

typed efstrutBiTNod e{TEl emTypedata;structBiTNod e*l chil d,*rchil d;}BiTNod e,*BiTree;

页脚内容1

《公共基础知识》复习word版

特点:使用结构体来表示结点元素,使用指针来指向结点的左右孩子。优点是插入与删除方便,节省空间,缺点是不能快速地随机访问结点元素。(4分)

在哈夫曼树中,使用静态三叉链表,这样可以方便地从根走到叶子,也可以从叶子走到根,而且可以随机访问和节省空间。(2分)

三、(本题10分)一棵二叉树的先序、中序和后序序列分别如下,其中有一部分未显示出来,试求出空格处的内容,并画出该二叉树。

先序序列:__B__F__ICEH__G;中序序列:D__KFIA__EJC__;后序序列:__K__FBHJ__G__A。

答案:先序序列:A B D F K ICEH J G

中序序列:D B KFIA H EJC G

后序序列:D K I FBHJ E G C A(11分)

画出树得4分。

四、(本题10分)分别使用普里姆算法和克鲁斯卡尔算法求出图G1的最小生成树,仅需画出最小生成树的成长过程即可。

页脚内容2

2011-2012海外学院期末英语试卷题库

Read the text below and answer Questions 1-6 Questions 1-3 Look at the three holidays, A,B and C, on page 1. For which holiday are the following statements true? Write the correct letter,A, B or C, in boxes 1-3 on your answer sheet. HOLIDAY PLUS Need a break? Choose from these three wonderful holidays! Holiday location Price Number of nights Daily meals included in package Comments Transport to\from airport A Mountain Lodge A unique wilderness retreat on the edge of the World Heritage-listed National Park and only 5 km from the sea $330 1 Mountain buffet breakfast plus Free soft drinks always available Free canoeing Free talks in the evening Free open-air tennis courts Horse-riding optional extra Self-drive auto 1 hour 15 minutes or bus three times\week appro.2 hours B Pelican Resort A true coral island right on the Great Barrier Reef Swim straight from the beach $58 4 Hot breakfast plus Beach picnic lunch plus set 4-course dinner Refurbishment: Resort will close for May Free minibus trip around island Plane flights to Wilson Island only $50 1/2 hour by minibus C Cedar Lodge A blend of casual sophistication and rich rainforest ambience for those over 25 $740 4 Tropical breakfast Picnic lunch-optional extra Oldest living rainforest Free bikes and tennis courts; horse-riding extra 10 mins by taxi

数据结构试题及答案10套

一、单选题(每题 2 分,共20分) 1. 1.对一个算法的评价,不包括如下(B )方面的内容。 A.健壮性和可读性B.并行性C。正确性D.时空复杂度 2.2.在带有头结点的单链表HL中,要向表头插入一个由指针p指向 的结点,则执行(A ). A. p-〉next=HL->next; HL-〉next=p; B. p-〉next=HL;HL=p; C。p->next=HL; p=HL;D. HL=p; p-〉next=HL; 3.3.对线性表,在下列哪种情况下应当采用链表表示?( B ) A.经常需要随机地存取元素 B。经常需要进行插入和删除操作 C。表中元素需要占据一片连续的存储空间D.表中元素的个数不变 4. 4.一个栈的输入序列为1 2 3,则下列序列中不可能是栈的输出序 列的是( C ) A. 2 3 1 ??? B. 3 2 1 C。 3 1 2 ??? D. 1 23 5. 5.AOV网是一种(D )。 A.有向图B.无向图C.无向无环图D.有向无环图 6.6。采用开放定址法处理散列表的冲突时,其平均查找长度(B)。 A.低于链接法处理冲突B.高于链接法处理冲突C.与链接法处理冲突相同 D。高于二分查找 7.7。若需要利用形参直接访问实参时,应将形参变量说明为(D ) 参数. A。值B。函数 C.指针 D。引用 8.8.在稀疏矩阵的带行指针向量的链接存储中,每个单链表中的结 点都具有相同的( A )。 A。行号 B.列号 C.元素值 D.非零元素个数 9.9.快速排序在最坏情况下的时间复杂度为( D )。 A。O(log 2n) B.O(nlog 2 n) C。0(n) D.0 (n2) 10.10.从二叉搜索树中查找一个元素时,其时间复杂度大致为( C ). A.O(n) B. O(1) C。 O(log 2 n) D. O(n2)二、运算题(每题 6 分,共24分)

2011-2012八年级英语上期期末试卷

2011-2012 八年级英语上期期末试卷 一、单项选择。 1. My little brother works very hard and hopes to go to ____ university in the USA. A. a B. an C. the D. / 2. Mum, it’s so hot and I’m so thirsty. Go and get some ______ in the fridge. A. biscuits B. chips C. ice cream D. cakes 3. Take some tomato sauce and add _______ to the bread , please. A. it B. them C. they D. one 4. The old sick lady is weak and eats __________ than before. A. better B. more C. fewer D. less 5. I _________ watch football matches because I’m not interested in them at all . A. always B. usually C. often D. hardly ever 6. I didn’t know Lisa came from Australia until she began to ________. A. say B. tell C. speak D. talk 7. The sweater is not comfortable. Please give me __________ one. A. the other B. another C. both D. every 8. Why not _________ to my house if you are free this Sunday? A. come in B. come over C. come down D. come back 9. In my class, most students go to school ______ bike and few students go to school _______ foot. A. with,on B. on, by C. on, with D. by, on 10. The movie about Mr Bean made all of us ________. A. laugh B. to laugh C. laughed D. laughing 11. Li lin ________ some foreigners to her 14th birthday party last night. A. invite B. invites C. invited D. is inviting 12. _______ are you doing for vacation? I’m visiting my uncle. A. When B. What C. Where D. Which 13. ______ help me post the letter ? I’d love to, but I’m too busy. A. Must B. Could C. Should D. Need 14. I’m going _________ with my parents. Where shall we go? Maybe Hangzhou. A. somewhere beautiful B. beautiful somewhere C. anywhere beautiful D. beautiful anywhere 15. We went to Hong Kong for shopping last month. A. That sounds wonderful B. You’re welcome C. I’m sorry to hear that. D. It doesn’t matter. 二、完形填空。 Dear editor, Both parents and children have busy days. The parents’ job is to go to 1 to make money. The children’s job is to go to school. After a day’s work, both parents and children get 2 . We have to cook the meals and wash the dishes. We 3 clothes every day and they get dirty easily. We have to wash them

数据结构试卷带答案

数据结构试卷(一) 一、选择题(20分) 1.组成数据的基本单位是( 1.C )。 (A) 数据项(B) 数据类型(C) 数据元素(D) 数据变量 2.设数据结构A=(D,R),其中D={1,2,3,4},R={r},r={<1,2>,<2,3>,<3,4>,<4,1>},则数据结构A是( C )。 (A) 线性结构(B) 树型结构(C) 图型结构(D) 集合 3.数组的逻辑结构不同于下列(D)的逻辑结构。 (A) 线性表(B) 栈(C) 队列(D) 树 4.二叉树中第i(i≥1)层上的结点数最多有(C)个。 (A) 2i (B) 2i(C) 2i-1(D) 2i-1 5.设指针变量p指向单链表结点A,则删除结点A的后继结点B需要的操作为(.A )。 (A) p->next=p->next->next (B) p=p->next (C) p=p->next->next (D) p->next=p 6.设栈S和队列Q的初始状态为空,元素E1、E2、E3、E4、E5和E6依次通过栈S,一个元素出栈后即进入队列Q,若6个元素出列的顺序为E2、E4、E3、E6、E5和E1,则栈S的容量至少应该是(.C )。 (A) 6 (B) 4 (C) 3 (D) 2 7.将10阶对称矩阵压缩存储到一维数组A中,则数组A的长度最少为(C )。 (A) 100 (B) 40 (C) 55 (D) 80 8.设结点A有3个兄弟结点且结点B为结点A的双亲结点,则结点B的度数数为(8.B (A) 3 (B) 4 (C) 5 (D) 1 9.根据二叉树的定义可知二叉树共有(B)种不同的形态。 (A) 4 (B) 5 (C) 6 (D) 7 10.设有以下四种排序方法,则(B )的空间复杂度最大。 (A) 冒泡排序(B) 快速排序(C) 堆排序(D) 希尔排序 二、填空题(30分) 1.设顺序循环队列Q[0:m-1]的队头指针和队尾指针分别为F和R,其中队头指针F指向当前队头元 素的前一个位置,队尾指针R指向当前队尾元素所在的位置,则出队列的语句为F =____________;。 2.设线性表中有n个数据元素,则在顺序存储结构上实现顺序查找的平均时间复杂度为___________, 在链式存储结构上实现顺序查找的平均时间复杂度为___________。 3.设一棵二叉树中有n个结点,则当用二叉链表作为其存储结构时,该二叉链表中共有________个指 针域,__________个空指针域。 4.设指针变量p指向单链表中结点A,指针变量s指向被插入的结点B,则在结点A的后面插入结点 B的操作序列为______________________________________。 5.设无向图G中有n个顶点和e条边,则其对应的邻接表中有_________个表头结点和_________个表 结点。 6.设无向图G中有n个顶点e条边,所有顶点的度数之和为m,则e和m有______关系。 7.设一棵二叉树的前序遍历序列和中序遍历序列均为ABC,则该二叉树的后序遍历序列为__________。 8.设一棵完全二叉树中有21个结点,如果按照从上到下、从左到右的顺序从1开始顺序编号,则编 号为8的双亲结点的编号是___________,编号为8的左孩子结点的编号是_____________。 9.下列程序段的功能实现子串t在主串s中位置的算法,要求在下划线处填上正确语句。 int index(char s[ ], char t[ ]) { i=j=0; while(i

数据结构期末考试试题及答案

《数据结构》期末考试试题及答案 (2003-2004学年第2学期) 单项选择题1、C 2、D 3、A 4、D 5、C 6、D 7、A 8、B 9、C 10、C 、 1. 对于一个算法,当输入非法数据时,也要能作出相应的处理,这种要求称为 (c )。 (A)、正确性但).可行性(C).健壮性 2 ?设S为C语言的语句,计算机执行下面算法时, for(i=n-1 ; i>=0; i--) for(j=0 ; jvi; j++) (A)、n2(B). O(nlgn) 3?折半查找法适用于( a (D). 输入性 算法的时间复杂度为(d S; (C). O(n) (D). )。 O(n2) (A)、有序顺序表(B)、有序单链表 (C)、有序顺序表和有序单链表都可以 4 .顺序存储结构的优势是( d )。 (A)、利于插入操作(B)、利于删除操作 (C)、利于顺序访问(D)、利于随机访问 5. 深度为k的完全二叉树,其叶子结点必在第 (A)、k-1 ( B)、k (C)、k-1 和 6. 具有60个结点的二叉树,其叶子结点有 (A)、11 ( B)、13 ( C)、48 (D)、无限制 c )层上。 (D)、1 至 k 12个,则度过1 (D)、37 k 的结点数为( 7 .图的Depth-First Search(DFS) 遍历思想实际上是二叉树( 法的推广。 (A)、先序(B)、中序(C)、后序(D)、层序 8.在下列链队列Q中,元素a出队的操作序列为( a )遍历方 front (A )、 (B )、 (C)、 (D )、p=Q.front->next; p->next= Q.front->next; p=Q.front->next; Q.front->next=p->next; p=Q.rear->next; p->next= Q.rear->next; p=Q->next; Q->next=p->next; 9. Huffman树的带权路径长度WPL等于( (A)、除根结点之外的所有结点权值之和(C)、各叶子结点的带权路径长度之和(B) 、 ) 所有结点权值之和 根结点的值 b ■

英语2011上学期期末试题

江西财经大学现代经济管理学院 2011-2012第一学期期末考试试卷 Part II Reading Comprehension (Skimming and Scanning) (10%)Directions: For questions 1-7, mark Y (for YES) if the statement agrees with the information given in the passage; N (for NO) if the statement contradicts the information given in the passage; NG (for NOT GIVEN) if the information is not given in the passage. For questions 8-10, complete the sentences with the information given in the passage. Wildfires In just seconds, a spark or even the sun’s heat alone sets off an extremely large fire. The wildfire quickly spreads, consuming the thick, dried-out plants and almost everything else in its path. What was once a forest becomes a virtual powder keg of untapped fuel. In a seemingly instantaneous burst, the wildfire overtakes thousands of acres of surrounding land , threatening the homes and lives of many in the vicinity. Fire Starters . On a hot summer day , when drought conditions peak , something as small as a spark from a train car’s wheel striking the track can ignite a raging wildfire. Sometimes, fires occur naturally, ignited by heat from the sun or a lightning strike . However, the majority of wildfires are the result of human carelessness. Common causes for wildfires include: Arson(故意)放火,纵火. Campfires Discarding lit cigarettes. Improperly burning debris Playing with matches or fireworks Prescribed fires - Everything has a temperature at which it will burst into flames. This temperature is called a material’s flash point. Woods flash point is 572 degrees Fahrenheit (300 ) . When wood is heated to this temperature, it releases hydrocarbon gases that mix with oxygen in the air, combust and create fire. There are three components needed for ignition and combustion to occur. A fire requires fuel to burn, air to supply oxygen, and a heat source to bring the fuel up to ignition temperature. Heat, oxygen and fuel form the fire triangle. Firefighters often talk about the fire triangle when they are trying to put out a blaze. The idea is that if they can take away any one of the pillars of the triangle,

初一英语期末考试试卷2011-2012

南通市第一初级中学2011-2012学年度第二学期期末试卷 七年级英语 (本试卷满分150分,考试时间120分钟) Ⅰ卷(90分) 一、听力部分 A、听对话选择合适的图画或答案,每段对话听两遍。(共10分) ( ) 1. What is the girl learning to play? A. B. C. ( ) 2. What’s on the wall? A. B. C. ( ) 3. What’s the girl’s mum doing? A. B. C. ( ) 4. A. B. C. ( ) 5. Where’s the boy’s computer? A. Behind the shelf. B. On the coffee table. C. On the newspapers.

( ) 6. What does Peter’s father do at the weekend? A. He goes fishing. B. He cleans the house. C. He cleans his car. ( ) 7. What will Peter do this Saturday? A. He’ll climb the hill. B. He’ll do his homework. C. He’ll do some housework. ( ) 8. When may Millie get to the party? A. After 7 o’clock. B. Before 7 o’clock. C. At 7 o’clock. ( ) 9. What does the boy mean? A. Kate dislikes going to the Great Wall. B. Kate will be happy to go with them. C. It’s better to take Kate to another place of interest. ( ) 10. What does Wendy usually do before she goes to bed? A. He watches TV. B. He reads newspapers. C. He reads story books. B、根据所听到的对话或独白,选择正确答案,每段对话听两遍。(共10分) 听下面一段对话,回答11~12小题。 ( ) 11. What is Mary going to do tomorrow? A. She is going to play basketball. B. She is going to do her homework. C. She is going to have a picnic. ( ) 12. Who bought something to eat for Mary? A. Tom. B. Jack. C. Mary’s mother. 听下面一段对话,回答13~15小题。 ( ) 13. Why can’t Tom ride his bike to his school? A. Because the traffic is busy. B. Because something is wrong with his bike. C. Because his home is near the school. ( ) 14. When does the dialogue (对话) most probably take place(发生)? A. At night B. At noon. C. In the morning. ( ) 15. Where are they now? A. At school. B. On the bus. C. At home. 听下面一段独白,回答16—20题。 ( ) 16. What time does Wei Fang go to school? A. At 6:30. B. At 7:00. C. At 7:30. ( ) 17. Which school is Wei Fang in? A. No. 6 Middle School. B. No. 5 Middle School. C. No. 4 Middle School. ( ) 18. How many students are there in her class? A. 50. B. 51. C. 52. ( ) 19. Who is Wei Fang’s English teacher? A. Mrs Wang. B. Mr Wang. C. Miss Wang ( ) 20. Where does Wei Fang’s good friend come from? A. America. B. Australia. C. England

数据结构试卷带答案

数据结构试卷带答案 问题说明 部分题目或答案有问题,现将已经发现的公布如下,同学在作这些模拟题的时候应着重做题方法的理解,遇到问题以教材或课件为准,不确定的地方可找同学商量或问我 (1)试卷1第一套填空题第1题,试卷1第2套选择题第3题关于循环队列队头指针和队尾指针的约定与教材不一致,以教材或课件为准,实际上front指向的是队头元素,rear指向当前尚未被占用的第一个队列空间,队慢或队空的判定条件及入队/出队等操作具体可参考课件或教材 (2)试卷1第一套应用题第5题,不声明邻接点顺序时默认编号最小的邻接点为第一邻接点,该图的深度优先遍历序列为123465,答案错。此外,当给定邻接表时则邻接点顺序按照邻接表中的前后顺序确定,如试卷1第二套填空题第8题 (3)试卷1第五套应用题第4题,两种方法处理冲突的方法下所求ASL值相等都为7/6 (4)试卷1第五套填空题第8题答案给出的是小顶堆需满足的条件,大顶堆满足ki>=k2i p->rlink->llink=p->llink;此外,注意课堂中讲的指针名和操作方法 (12)第4套填空题第6题答案错,设哈夫曼树中共有99个结点,则该树中有____50_____个叶子结点;若采用二叉链表作为存储结构,则该树中有__100___个空指针域。

(13)第5套选择第8题答案应为A:设连通图G中的边集E={(a,b),(a,e),(a,c),(b,e),(e,d),(d,f),(f,c)},则从顶点a出发可以得到一种深度优先遍历的顶点序列为(A) abedfc (14)第5套应用题第3题题目未指明查找方法,没法作 (15)第6套选择第5题应选B,实际是任意结点至多只有一个孩子:设二叉树的先序遍历序列和后序遍历序列正好相反,则该二叉树满足的条件是(B) 高度等于其结点数 (16)第7套填空1题问题本身错,设指针变量p指向双向链表中的结点A,指针变量s指向被插入的结点X,则在结点A的后面插入结点X的操作序列为____s->left_____=p;s->right=p->right;___p->right_______=s;s->right->left=s;(设结点中的两个指针域分别为left和right)。(17)第8套填空题第8题答案错 (18)第7套选择第3题题目错,应以60为基准关键字,答案为C.设一组初始记录关键字序列为(60,80,55,40,42,85),则以第一个关键字60为基准而得到的一趟快速排序结果是()。 (C) 42,40,55,60,80,85 (17)第6套填空9题.快速排序算法的空间复杂度平均情况下为_O(logn)_,最坏的情况下为_O(n)_。(18)第9套填空第3题,题目说循环队列有m个元素实际指循环队列总长为m,此外,该题关于队头和队尾指针的约定不同于教材 (19)第9套填空第4题答案错,9个元素冒泡排序,第一趟比较次数为8,最多8趟

数据结构试卷和答案

《数据结构》试题参考答案 (开卷) (电信系本科2001级 2002年12月) 一、回答下列问题 (每题4分,共36分) 1. 某完全二叉树共有15381个结点,请问其树叶有多少个? 答:n2=?n/2?=?15381/2?=7691(个) 2. 假设有二维数组A 7×9,每个元素用相邻的6个字节存储,存储器按字节编址。已知A 的起始存储位置(基地址)为1000,末尾元素A[6][8]的第一个字节地址为多少?若按列存储时,元素A[4][7]的第一个字节地址为多少? 答:① 末尾元素A[6][8]的第一个字节地址=1000+(7行×9列—1)×6B =1000+62×6=1372 ②按列存储时,元素A[4][7]的第一个字节地址=1000+(7列×7行+4)×6B =1000+53×6=1318 3. 在KMP 算法中,已知模式串为ADABBADADA ,请写出模式串的next[j]函数值。 答:根据 0 当j =1时 next[ j ]= max { k |1

英语Ⅰ(2)期末试卷 及答案 2011年1月

英语Ⅰ(2)期末试卷及答案2011年1月 第一部分交际用语(共计10分) 1-5题:阅读下面的小对话,判断答语是否恰当,恰当的选A(Right),不恰当的选B(Wrong),并将答案写在答题纸上 1– What would you like to drink, madam? - Can I have a glass of white wine?- A Right - B. Wrong 2.- Are you ready to order ? - Yes. I’ll have a chicken salad please. A Right B Wrong 3.– How can I book a cheap hotel? - If I were you, I’d phone a travel agent. A Right B Wrong 4.– Have you seen today’s newspaper? - Yes. I am. A Right B Wrong 5.What’s your job? _ It’s very good. I like it.________. A Right B Wrong 第二部分词汇与结构(共计40分,每小题2分) 6-25题:阅读下面的句子和对话,从A、B、C 三个选项中选出一个能填入空白处的最佳选项,并在答题纸上写出所选的字母符号。 6.She’s the person ___ owns the restaurant.. A who B which C what 7.He’s not tall _____ to play basketball. A enough B too C very 8.____ I missed the train, I arrived at work on time. A Because B Although C If 9.The book was rather expensive, but I bought it _______. A any way B even though C anyway 10.When I saw him, I ______ him ___ some money. A asked, for B ask, for C asked, with 11.- Which jumper do you like?. - The red ____ over there. A one B it C that 12.– Could I see the manager now? _ I’m sorry you can’t. He has _____ to Hong Kong. A been B gone C stayed 13.You didn’t order the cheese, _____? A do you B did you C have you 14.We built the house ______. Nobody helped us. A ourselves B ours C myself 15.You have ____ done a very good job. A very B indeed C certainly 16.Could you please tell us what kind of work _____ you have got experience? A in which B which C at that 17.Quick, call the doctor! I think I ______ my arm. A have broken B break C am breaking 18. A car hit her when she was walking ____ the road. A across B through C at 19.I went to his house but couldn’t get in. There was ____ there. A no one B nothing C someone 20.Get up! Mary. Tom has _____ called you three times this morning. A yet B already C never 21.The school telephoned to tell me that my son had hurt ____ playing football. A herself B yourself C himself 22.You ____ wear a uniform at school. You can wear anything you like. A have to B don’t have to C mustn’t 23.____ the rain and the wind, he came on time. A Apart from B In spite of C Although 24.I can’t sit here; this chair is very _____. A uncomfortable B discomfortable C noncomfortable 25. If I ____ you, I’d see that car as quickly as possible. A were B am C was 第三部分句型变换(共计15分, 每小题3分) 26-30题:根据括号里的提示或利用括号里的词语改写下列句子,并将答案写在答题纸上 26.Jack is responsible for all the training. (用What针对划线提问) 27.“ I can’t find my notebook,” she said. (改为间接引语) 28.I’m tall and thin. My sister is too. (用so改写句子) 29.He’s gone to Shanghai. He’s negotiating a new contract.(用动词不定式将两句合成一句) 30.Mary didn’t stay at home. She went to see Tim. (用instead of 将两句连成一句)

数据结构试题及答案

第一章概论 一、选择题 1、研究数据结构就是研究(D)。 A. 数据的逻辑结构?B。数据的存储结构 C。数据的逻辑结构和存储结构?D.数据的逻辑结构、存储结构及其基本操作(研究非数值计算的程序设计问题中,计算机操作对象以及他们之间的关系和操作) 2、算法分析的两个主要方面是(A)。 A.空间复杂度和时间复杂度???B。正确性和简单性 C。可读性和文档性D.数据复杂性和程序复杂性 3、具有线性结构的数据结构是( D )。(线性结构就是:在非空有限集合中,存在为一个被称为第一个的数据元素和最后一个元素,有除了第一个元素,集合中每一个元素均只有一个前驱,除了最后一个元素有唯一后继)(链表、栈、队列、数组、串) A. 图B. 树??C.广义表(线性表的推广) D.栈 4、计算机中的算法指的是解决某一个问题的有限运算序列,它必须具备输入、输出、( B )等5个特性。 A.可执行性、可移植性和可扩充性? B. 可执行性、有穷性和确定性 C。确定性、有穷性和稳定性??? D. 易读性、稳定性和确定性 5、下面程序段的时间复杂度是( C )。 for(i=0;i

数据结构试题(含答案)

一.是非题 (正确的打“√”,错误的打“×”。) 1. 数据结构可用三元式表示(D,S,P)。其中:D是数据对象,S是D上的关系, P是对D的基本操作集。× 2. 线性表的链式存储结构具有可直接存取表中任一元素的优点。× 3. 字符串是数据对象特定的线性表。 4. 二叉树是一棵结点的度最大为二的树。× 5.邻接多重表可以用以表示无向图,也可用以表示有向图。× 6.可从任意有向图中得到关于所有顶点的拓扑次序。× 7.一棵无向连通图的生成树是其极大的连通子图。× 8.二叉排序树的查找长度至多为log2n。× 9.对于一棵m阶的B-树.树中每个结点至多有m 个关键字。除根之外的所有非终端结点至少有┌m/2┐个关键字。× 10.对于目前所知的排序方法,快速排序具有最好的平均性能。 11. 顺序存储方式的优点是存储密度大,且插入、删除运算效率高。× 12. 二维数组是其数据元素为线性表的线性表。 13. 连通图G的生成树是一个包含G的所有n个顶点和n-1条边的子图。× 14. 折半查找不适用于有序链表的查找。 15. 完全二叉树必定是平衡二叉树。 16. 中序线索二叉树的优点是便于在中序下查找直接前驱结点和直接后继结点。 17. 队列是与线性表完全不同的一种数据结构。× 18. 平均查找长度与记录的查找概率有关。 19. 二叉树中每个结点有两个子结点,而对一般的树,则无此限制,所以,二叉树是树的特殊情形。× 20. 算法的时间复杂性越好,可读性就越差;反之,算法的可读性越好,则时间复杂性就越差。× 二.选择题 1. 若对编号为1,2,3的列车车厢依次通过扳道栈进行调度,不能得到 ( e ) 的序列。 a:1,2,3 b:1,3,2 c:2,1,3 d:2,3,1 e:3,1,2 f:3,2,1 2. 递归程序可借助于( b )转化为非递归程序。 a:线性表 b: 栈 c:队列 d:数组 3. 在下列数据结构中( c )具有先进先出(FIFO)特性, ( b )具有先进后出(FILO)特性。 a:线性表 b:栈 c:队列 d:广义表 4. 对字符串s=’data-structure’ 执行操作replace(s,substring(s,6,8),’bas’)

2011--2012七年级英语上册期末试卷

2011--2012七年级英语上册期末试卷姓名张梓珩班级19 座号01 分数80 选择题 Ⅰ. 基础选择(15分): ( B ) 1.-Thank you very much. -_________ A. Welcome! B. You are welcome C. Sure D. Of course ( D )2.These apples are _____. _____ are in _____ bag. A. my. You, You B. My, Yours, your C. mine, Your, Yours D. mine, Yours, your ( B )3.Would you like _____ your mother cook supper? A. helping B. to help C. help D. helping ( D×A)4.Let Tom _____ right away. A. go home B. to go home C. goes home D. goes to home ( D )5.My friend Billy lives _______ China. A. with B. from C. under D. in ( C )6.I have a pet, ______ name is Polly. A. it’s B. it C. its D. My ( C )7.-_______ ? -He’s a doctor. A . What is his name B. What does he look like C. What does he do D. What does he like ( D )8.We would like some meat and fruit _____ lunch. A. to B. in C. of D. for ( A )9.Would you please _____ her _____ me back? A. ask, to call B. ask, call C. to ask, call D. to ask, to call ( A )10.-. -Nice to see you, too. A. Nice to see you. B. How are you? C. How do you do! D. See you later ( D×A)11. A: Thank you, Kangkang. B: . A. Not at all. B. Of course. C. I think so. D . Don't say that ?( C ×D)12.-Michael works _______ a farm. His sister works ____ a factory. A. in, in B. on, on C. in, on D. on, in ( B )13.-____the man? -He is Kate’s father. A. What’s. B. Who’s C.Whose’s D.How’s ( B ×D)14.-What color is it? -It’s orange. It’s orange pen. A. a, an B.an, an C. an,× D. ×, an ( B )15.Linda’s aunt and uncle _______ workers. A. are all B. are both C. both are D. is both Ⅱ.完形填空。(10分)

相关文档
最新文档