Chapter 1 Introduction

Chapter 1 Unit test

1、单选题:
​The following statement is correct ____‍
选项:
A: A good algorithm will not appear inexplicable due to illegal input data.
B: The pros and cons of the algorithm has nothing to do with the description language of the algorithm, but it is related to the environmental factors of the computer.
C: The logical structure of data depends on the storage structure of the data.
D: All of the above are wrong
答案: 【 A good algorithm will not appear inexplicable due to illegal input data.

2、单选题:
Logically, the data structure can be divided into _____ two categories‎
选项:
A: Linear Structure and Nonlinear Structure
B: Primary Structure and Tectonic Structure
C: Sequential Structure and chain Structure
D: Dynamic Structure and Static Structure
答案: 【 Linear Structure and Nonlinear Structure

3、单选题:
‌When the data is stored in a linked structure, the address of the storage unit ________‎
选项:
A: Not necessarily continuous
B: Must be continuous.
C: Must be discontinuous.
D: Partly continuous, partly discontinuous.
答案: 【 Not necessarily continuous

4、单选题:
Logically, data structures can be divided into two main categories of ___________‏
选项:
A: Linear structure, nonlinear structure
B: Dynamic structure, static structure
C: Sequential structure, chain structure
D: Primary structure, structural structure
答案: 【 Linear structure, nonlinear structure

5、填空题:
‍The four basic logical structures are set structure, ____ structure, graph structure, and tree structure.‍
答案: 【 linear

6、填空题:
‎The four basic logical structures include linear structures, ____ structures, graphical structures, and tree structures.‏
答案: 【 set

7、填空题:
‏The four basic logical structures are set structure, ____ structure, linear structure, and tree structure.​
答案: 【 graph

8、填空题:
‍The four basic logical structures are set structure, ____ structure, linear structure, and graphical structure.​
答案: 【 tree

Chapter 10 Minimum Spanning Trees

Chapter 10 Unit test

1、单选题:

​The minimum spanning trees of the following figure is constructed using Primm's algorithm, starting from A, and the third bar is added to the generation tree with a side of ______.

‎选项:
A: (D,E)
B: (A,B)
C: (D,K)
D: (E,C)
答案: 【 (D,E)

2、单选题:

​The minimum spanning trees of the following figure is constructed using Primm's algorithm, starting with B, and the third bar is added to the generation tree with a side of ______.

‌选项:
A: (E,J)
B: (C,F)
C: (E,C)
D: (D,E)
答案: 【 (E,J)

3、判断题:

​Using Primm's algorithm to construct the minimum spanning trees of the following graph, starting from E, then the edges (J,H) must be the edges of the 5th article added to the generation tree.

‍选项:
A: 正确
B: 错误
答案: 【 错误

4、判断题:

​Using Kruskal's algorithm to construct the minimum spanning trees for the following figure, the first edge that is added to the generation tree must be (E,C).

​选项:
A: 正确
B: 错误
答案: 【 错误

5、判断题:

​Using Kruskal's algorithm to construct the minimum spanning trees for the following figure, the last edge that is added to the generation tree must be (A,B).

‎选项:
A: 正确
B: 错误
答案: 【 错误

6、判断题:

‌Using Kruskal's algorithm to construct the minimum spanning trees for the following figure, the last edge that is added to the generation tree must be (D,K).

‎选项:
A: 正确
B: 错误
答案: 【 错误

7、判断题:
​The single source shortest path algorithm can be used to find the shortest path between any two vertices in the graph‏
选项:
A: 正确
B: 错误
答案: 【 错误

Chapter 2 Complexity Theory

Chapter 2 Unit test

1、单选题:
‌The time complexity of the algorithm depends on ________.‎
选项:
A: Scale of the problem
B: Hardware and software configuration of the computer
C: Both.
D: Neither.
答案: 【 Scale of the problem

2、单选题:
‎The calculation amount of algorithm is called the ___________ of the calculation.‏
选项:
A: Time Complexity
B: Efficiency
C: Reality
D: Difficulty
答案: 【 Time Complexity

3、单选题:
‎The time complexity of the following program is _________________.‌‎‌‎for(i=0;i<n;i++)‌‎‌‎    for(j=0;j<i;j++)‌‎‌‎         x++;‌
选项:
A: O(n^2)
B: O(2n)
C: O(n)
D:
答案: 【 O(n^2)

4、单选题:
‏The time complexity of the following function is_________________.‍‏‍‏           int func(int  n){‍‏                    int i=0,sum=0;‍‏                    while(sum<n)   ‍‏                           sum+=++i;‍‏                    return i;‍‏                 }‍‏‍
选项:
A:
B:
C: O(n)
D:
答案: 【 

5、填空题:
​The asymptotic time complexity of the following method is ______.‍​(Note that there should no spaces when filling in the answer. You can use x^y to denote y power of x)‍​‍​void aFunc(int n) {‍​    for (int i = 0; i < n; i++) {‍​        for (int j = i; j < n; j++) {‍​            printf("Hello Worldn");‍​        }‍​    }‍​}‍​‍​‍
答案: 【 O(n^2)

6、填空题:
‍The time complexity of  aFunc is _____. ‎‍(Note that there should no spaces when filling in the answer. logn denotes the logarithm function and its base is 2)‎‍void aFunc(int n) {‎‍    for (int i = 2; i < n; i++) {‎‍        i *= 2;‎‍        printf("%in", i);‎‍    }‎‍}‎
答案: 【 O(logn)

7、填空题:

‎The asymptotic time complexity of the algorithm 

‎is ________ if the number of key steps of the algorithm is .

‎答案: 【 O(n^2)

8、填空题:

​The asymptotic time complexity of the algorithm is ________ if the number of key steps of the algorithm is 

‎答案: 【 O(mlogn+m^3)##%_YZPRLFH_%##O(m^3+mlogn)

Chapter 3 Linear Data Structures

Chapter 3 Unit test

1、单选题:
If the most common operation of a linear list is to read the value of the ith element, it is most efficient to use ________ storage.​
选项:
A: Sequential List
B: Ordered List
C: Single Linked List
D: Two-way Linked List
答案: 【 Sequential List

2、单选题:
For a linear list, the following statement is correct ________.​
选项:
A: Each element has a direct antecedent and a direct successor except the first element and the last element
B: Each element has a direct precursor and a dire

剩余75%内容付费后可查看

发表评论

电子邮件地址不会被公开。 必填项已用*标注