浙江工业大学_843数据结构2017年_考研专业课真题
浙江理工大学_991数据结构2017年_考研专业课真题

浙江理工大学2017年硕士研究生招生考试初试试题考试科目:数据结构代码:991 (请考生在答题纸上答题,在此试题纸上答题无效)一、单选题:(每小题2分,共30分)1. 不带头结点的单链表simpleList为空的判定条件是。
A. simpleList == nullB. simpleList->next == nullC. simpleList->next = simpleListD. simpleList! = null2. 某线性表最常用的操作是在最后一个结点之后插入一个结点或删除第一个结点,故采用_______________存储方式最节省运算时间。
A. 单链表B. 仅有头结点的单循环链表C. 双链表D. 仅有尾指针的单循环链表3. 向一个栈顶指针为top的链栈中插入一个S所指结点时,则执行_______________________。
A. top->next = S;B. S->next = top->next; top->next = S;C. S->next = top; top = S;D. S->next = top; top = top->next;4. 一维数组和线性表的区别是_____________。
A. 前者长度固定,后者长度可变B. 后者长度固定,前者长度可变C. 两者长度均固定D. 两者长度均可变5. 设矩阵A是一个对称矩阵,为了节省存储,将其下三角部分按行序存放在一维数组B[1,),在一组数组B的下标位置K的值是n(n-1)/2]中,对任一下三角部分中任一元素a ij(i j______。
A. i(i-1)/2+j-1B. i(i-1)/2+jC. i(i+1)/2+j-1D. i(i+1)/2+j6.在线索化二叉树中,P所指的结点没有左子树的充要条件是_______________________。
A. P->left == nullB. P->ltag =1C. P->ltag ==1 且 P->left ==nullD. 以上都不对7. 如果Tree2是由有序树Tree1转换而来的二叉树,那么Tree1中结点的后序就是Tree2中结点的____________________。
【2017年武汉纺织大学考研真题】848数据结构

0
1
1 ZHAO 2
2 QIAN 3
3 SUN 4
4 LI
5
5 ZHOU 6
6 WU
7
7 ZHENG 8
8 WANG 0
9
10
共 4 页;第 3 页
①画出插入数据元素“SHI”后的静态链表(5 分) ②画出删除数据元素“ZHENG”后的静态链表(5 分) 7、已知待排序的关键字序列为{50,60,30,90,80,20} ①采用“直接插入排序”方法,写出按从小到大的顺序进行排序的过程(5 分) ②采用“起泡排序”方法,写出按从小到大的顺序进行排序的过程(5 分) ③采用“简单选择排序”方法,写出按从小到大的顺序进行排序的过程(5 分) 三、算法设计题(共 20 分) 已知函数头为“int prime(int n)”,函数 prime 的功能:如果 n 是质数,返回 1; 否则,返回 0。编写并调用函数 prime 输出 1000 以内所有的质数,每行输出 10 个 质数。要求写出完整的程序。(注:质数是指在大于 1 的整数中,除了 1 和该整数 自身外,不能被其他正整数整除的整数)
共 4 页;第 4 页
共 页;第 页
共 页;第 页
共 共 页4 页第;第 页1 页
6、栈的入栈序列为 abcdefg,出栈序列的第一个元素是 g,则出栈序列的第五个 元素是_____。 7、深度为 10 的满二叉树共有_____个结点。 8、二叉树中有 100 个度为 2 的结点,该二叉树中有_____个度为 0 的结点。 9、无向图中共有 20 个顶点,当具有_____条边时,该无向图被称为完全图。 10、按排序方法的稳定性而言,希尔排序是_____的排序方法。 二、解答题(共 100 分) 1、已知循环队列的最大长度为 6,队列中已有 3 个元素,队列头元素是 a,队列 尾元素是 c,如下图所示。依次进行三步操作:d 入队列;e 入队列;一个元素出 队列。
浙工大数据结构期末试卷

浙江工业大学2006/2007学年《数据结构》试卷B(注意:所有的答案写在答题纸上,否则成绩无效)班级: 学号: 姓名:1. 单选题. (20 * 1 = 20分)(1) 数据结构是指()A) 数据的组织形式B) 数据类型C) 数据存储结构D) 数据定义(2) 在一个具有n个元素的有序向量表中插入一个新结点并依然有序的时间复杂度是()A) O(1) B) O(n) C) O(n2) D) O(nlogn)(3) 表达式f+(a+b)/(d-e)*2的后缀是().A) ab+f+de-/2* B) ab+de-/f+2*C) fab+de-2*/+ D) fab+de-/2*+(4) 以下的数据结构中,不是线性结构的是()A) 栈B) 队列C) 图D) 字符串(5) 栈和队列的共同特点是() .A) 都是先进后出B) 都是先进先出C) 只允许在端点处插入和删除D) 没有共同点(6) 二分法查找适合( ) .A) 有序序列B) 无序序列C) A和B D) 既不是A也不是B(7) 根据二叉树的定义,已知3个结点的前序序列,刚该树有几种可能( ).A) 6 B) 5 C) 4 D) 3(8) 下列应用中,需使用队列的是( )A ) 实现递归算法B ) 实现广度优先搜索C ) 实现表达式计算D ) 实现深度优先搜索(9) 用某种排序方法对线性表( 25, 38, 21, 47, 15, 27, 68, 35, 20) 进行排序,元素序列的变化情况如下(1) 25, 38, 21, 47, 15, 27, 68, 35, 20 (2) 20, 15, 21, 25, 47, 27, 68, 35, 38 (3) 15, 20, 21, 25, 38, 27, 35, 47, 68 (4) 15, 20, 21, 25, 35, 27, 38, 47, 68 则采用的排序方法是()A) 选择排序 B) 冒泡排序 C) 归并排序 D) 快速排序(10) 以下的四个二叉树中,( ) 是二叉排序树.A) B)C) D)(11) 在以下的序列中,( ) 是最大堆A)86, 67, 34, 72, 56, 53, 29 B) 86, 72, 34, 48, 56, 53, 29 C)92, 72, 50, 48, 56, 53, 29 D) 86, 72, 53, 48, 56, 29, 34(12) 散列表长 m = 15, 散列函数hash(key) = key % 13, 表中已经有了4个结点, 关键字分别是18, 32, 59, 73, 其余地址为空,如是采用开地址散列处理冲突,那么关键字109的结点地址为( )A) 8 B) 9 C) 5 D) 4(13) 有一个有序表为( 5,7,11,19,37,41,45,62,75,77,93,95,100),当采用二分法查找值为93的结点时,( )次比较后查找成功。
武汉纺织大学848数据结构2017年考研专业课真题

一、填空题(每空 3 分,共 30 分) 1、_____是对客观事物的符号表示,在计算机科学中是指所有能输入到计算机中 并被计算机程序处理的符号总称。 2、根据数据元素之间关系的不同特性,通常有下列四类基本结构:集合、线性 结构、_____、图状结构或网状结构。 3、算法具有下列五个重要特性:_____、确定性、可行性、输入、输出。 4、以下程序段的时间复杂度为_____。 for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) { c[i][j] = 0; for (k = 1; k <= n; k++) c[i][j] += a[i][k] * b[k][j]; } 5、 在长度为 n 的顺序表的第 i 个元素 ai 之前插入一个元素, 需移动_____个元素。 (a1, a2, ... , ai, ... , an)
4 页;第 1 页 共 共页 第 页
6、栈的入栈序列为 abcdefg,出栈序列的第一个元素是 g,则出栈序列的第五个 元素是_____。 7、深度为 10 的满二叉树共有_____个结点。 8、二叉树中有 100 个度为 2 的结点,该二叉树中有_____个度为 0 的结点。 9、无向图中共有 20 个顶点,当具有_____条边时,该无向图被称为完全图。 10、按排序方法的稳定性而言,希尔排序是_____的排序方法。 二、解答题(共 100 分) 1、已知循环队列的最大长度为 6,队列中已有 3 个元素,队列头元素是 a,队列 尾元素是 c,如下图所示。依次进行三步操作:d 入队列;e 入队列;一个元素出 队列。
0
1
2 a front
3 b
4 c
浙江理工大学数据结构考研真题2007—2012、2017—2019年

A. P->left == null
B. P->ltag =1
C. P->ltag ==1 且 P->left ==null
D. 以上都不对
8. 稀疏矩阵一般的压缩存储方法有两种,即__________。
A.二维数组和三维数组
B.三元组和散列
第 1 页 ,共 4 页
C.三元组和十字链表
D.散列和十字链表
1. 用 S 表示入栈操作,X 表示出栈操作,若元素入栈顺序为 1234,为了得到 1342 出栈顺
序,相应的 S、X 操作串为__
___。
2.若二叉树 T 的前序遍历f,
则其后序遍历序列是_
____。
第 1 页,共 2 页
3.已知一个图的邻接矩阵表示,删除所有从第 i 个结点出发的边的方法是_ 4. 一棵有 124 个叶结点的完全二叉树,最多有______个结点。 5.对 n 个元素进行初始建堆的过程中,最多进行___ ___数据比较。
_________地址相同。
A.a[5,3];
B.a[8,3]; C.a[1,4]; D.A、B、C 均不对;
7.在有向图的邻接表存储结构中,顶点 v 在表结点中出现的次数等于_________。
A.顶点 v 的度; B.顶点 v 的出度; C.顶点 v 的入度; D.依附于顶点 v 的边数;
二.填空题(20 分)
3. 常对数组进行的两种基本操作是
。
A.建立与删除
B.插入与修改
C.查找与修改
D.查找与插入
4. 数组 Q[n]用来表示一个循环队列,f为当前队列头元素的前一位置,r为队尾
元素的位置,假定队列中元素的个数小于n,计算队列中元素的公式
浙工大新传学硕真题2017

浙工大新传学硕真题2017Part I Reading Comprehension (30%)Directions: There are three passages in this part. Each passage is followed by some questions or unfinished statements. For each of them there are four choices marked A, B, C and D. You should decide on the best choice and mark the corresponding letter on the Answer Sheet with a single line through the center.Passage 1Questions 1 to 5 are based on the following passage:When we talk about intelligence, we do not mean the ability to get good scores on certain kinds of tests or even the ability to do well in school. By intelligence we mean a way of living and behaving, especially in a new or upsetting situation. If we want to test intelligence, we need to find out how a person acts instead of how much he knows what to do.(76) For instance, when in a new situation, an intelligent person thinks about the situation, not about himself or what might happen to him. He tries to find out all he can, and then he acts immediatelyand tries to do something about it. He probably isn't sure how it will all work out, but at least he tries. And, if he can't make things work out right, he doesn't feel ashamed that he failed; he just tries to learn from his mistakes. An intelligent person, even if he is very young, has a special outlook on life, a special feeling about life, and knows how he fits into it.If you look at children, you'll see great difference between what we call "bright" children and "not-bright" children. They are actually two different kinds of people, not just the same kind with different amount of intelligence. For example, the bright child really wants to find out about life - he tries to get in touch with everything around him. (77) But, the unintelligent child keeps more to himself and his own dream-world; he seems to have a wall between him and life in general.1. According to this passage, intelligence is __________.A. the ability to study wellB. the ability to do well in schoolC. the ability to deal with lifeD. the ability to get high scores on some tests2. In a new situation, an intelligent person__________.A. knows more about what might happen to himB. is sure of the result he will getC. concentrates on what to do about the situationD. cares more about himself3. If an intelligent person failed, he would__________.A. try not to feel ashamedB. learn from his experiencesC. try to regret as much as possibleD. make sure what result he would get4. Bright children and not-bright children__________.A. are two different types of childrenB. are different mainly in their degree of clevernessC. have difference only in their way of thinkingD. have different knowledge about the world5. The author of this passage will probably continue to talk about __________.A. how to determine what intelligence isB. how education should be foundC. how to solve practical problemsD. how an unintelligent person should be taughtPassage 2Questions 6 to 10 are based on the following passage:Human needs seem endless. (78) When a hungry man gets a meal, he begins to think about an overcoat, when a manager gets a new sports car, a big house and pleasure boats dance into view.The many needs of mankind might be regarded as making up several levels. When there is money enough to satisfy one level of needs, another level appears.The first and most basic level of needs involves food. Once this level is satisfied, the second level of needs, clothing and some sort of shelter, appears. By the end of World War I1, these needs were satisfied for a great majority of Americans. Then a third level appeared. It included such items as automobiles and new houses.By 1957 or 1958 this third level of needs was fairly well satisfied. Then, in the late 1950s, a fourth level of needs appeared: the "life-enriching" level. (79) While the other levels involve physical satisfaction, that is. the feed in comfort, safety, and transportation,this level stresses mental needs for recognition, achievement, and happiness. It includes a variety of goods and services, many of which could be called "luxury" items. Among them are vacation trips, the best medical and dental care, and recreation. Also included here are fancy goods and the latest styles in clothing.On the fourth level, a lot of money is spent on services, while on the first three levels more is spent on goods. Will consumers raise their sights to a fifth level of needs as their income increases, or will they continue to demand luxuries and personal services on the fourth level?A fifth level would probably involve needs that can be achieved best by community action. Consumers may be spending more on taxes to pay for government action against disease, ignorance, crime, and prejudice. After filling our stomachs, our clothes closets, our garages, our teeth, and our minds, we now may seek to ensure the health, safety, and leisure to enjoy more fully the good things on the first four levels.6. According to the passage, man will begin to think about such needs as housing and clothing only when __________A. he has saved up enough moneyB. he has grown dissatisfied with his simple shelterC. he has satisfied his hungerD. he has learned to build houses7. It can be inferred from the passage that by the end of World War II, most Americans __________.A. were very richB. lived in povertyC. had the good things on the first three levelsD. did not own automobiles8. Which of the following is NOT related to "physical satisfaction"?A. A successful career.B. A comfortable home.C. A good meal.D. A family car.9. What is the main concern of man on the fourth level?A. The more goods the better.B. The more mental satisfaction the better.C. The more "luxury" items the better.D. The more earnings the better.10. The author tends to think that the fifth level __________A. would be little better than the fourth levelB. may be a lot more desirable than the first fourC. can be the last and most satisfying levelD. will become attainable before the government takes actionsPassage 3Questions 11 to 15 are based on the following passage:We use both words and gestures to express our feelings, but the problem is that these words and gestures can be understood in different ways.It is true that a smile means the same thing in any language. So does laughter or crying. There are also a number of striking similarities in the way different animals show the same feelings. Dogs, tigers and humans, for example, often show their teeth when they are angry. This is probably because they are born with those behavior patterns.Fear is another emotion that is shown in much the same way allover the world. (80) In Chinese and in English literature, a phrase like "he went pale and begin to tremble" suggests that the man is either very afraid or he has just got a very big shock. However, "he opened his eyes wide" is used to suggest anger in Chinese whereas in English it means surprise. In Chinese "surprise" can be described in a phrase like 'they stretched out their tongues!' Sticking out your tongue in English is an insulting gesture or expresses strong dislike.Even in the same culture, people differ in ability to understand and express feelings. Experiments in America have shown that women are usually better than men at recognizing fear, anger, love and happiness on people's faces. Other studies show that older people usually find it easier to recognize or understand body language than younger people do.11. According to the passage, __________.A. we can hardly understand what people's gestures meanB. we can not often be sure what people mean when they describe their feelings in words or gesturesC. words can be better understood by older peopleD. gestures can be understood by most of the people whilewords can not12. People's facial expressions may be misunderstood because __________.A. people of different ages may have different understandingB. people have different culturesC. people of different sex may understand a gesture in a different wayD. people of different countries speak different languages13. In the same culture, __________.A. people have different ability to understand and express feelingsB. people have the same understanding of somethingC. people never fail to understand each otherD. people are equally intelligent14. From this passage, we can conclude __________.A. words are used as frequently as gesturesB. words are often found difficult to understandC. words and gestures are both used in expressing feelingsD. gestures are more efficiently used than words15. The best title for this passage may be __________.A. Words and FeelingsB. Words, Gestures and FeelingsC. Gestures and FeelingsD. Culture and UnderstandingPart II Vocabulary and Structure (30%)Directions: In this part there are 30 incomplete sentences. For each sentence there are four choices marked A, B, C and D. Choose the ONE answer that best completes the sentence. Then mark the corresponding letter on the Answer Sheet with a single line through the center.16. History is a record of mankind; different historians, __________, interpret it differently.A. thereforeB. on the contraryC. howeverD. consequently17. It was not until it got dark __________ working.A. that they stoppedB. when they stoppedC. did they stopD. that they didn't stop18. Before the child went to bed, the father asked him to__________ all the toys he had taken out.A. put offB. put upC. put awayD. put out19. Thinking that you know __________ in fact you don't is not a good idea.A. whatB. thatC. whenD. which20."__________ does Mr. Johnson go to London on business?”“At least once a month.”A. How manyB. How longC. How oftenD. How答案:1—10.ADBDCCDSDA11—DDSASCCD。