浙大数据结构期末考试2009-2010

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

浙江大学2009–2010学年秋学期

《数据结构基础》课程期末考试试卷(A)

课程号: 211C0020_,开课学院:_计算机科学与技术_

考试试卷:√A卷、B卷(请在选定项上打√)

考试形式:√闭、开卷(请在选定项上打√),允许带____无___入场

考试日期: 2009 年 11 月 17 日,考试时间: 120 分钟

诚信考试,沉着应考,杜绝违纪。

考生姓名:学号:所属院系: _题序一二三四总分得分

评卷人

Answer Sheet

Part I (24)

1. 2. 3. 4. 5. 6.

7. 8a. 8b. 9. 10. 11.

Part II (18)

1. c______________d_________________ e_______________ f________________

2. c_________________

d_________________

Part III (43)

1.

2.

(a) The initial max-heap sequence is:

(b) The sequences of the first 4 runs are:

3.

(a) DFS:

(b) BFS:

(c) Topological order:

4.

S 1 2 3 4 5 6 7 8 9 10 Union(1,2)

Union(3,4)

Union(1,3)

Union(3,5)

Union(6,7)

Union(1,7)

Union(7,8)

Union(4,10)

NOTE: Please write your answers on the answer sheet.

注意:请将答案填写在答题纸上。

I. Please select the answer for the following problems. (24 points)

(1)Given as following the recurrence relations of the time

complexities of two programs:

P1. T(1)=1, T(N)=T(N/2)+1; and

P2. T(1)=1, T(N)=2T(N/2)+1;

What conclusion can be made about the time complexities of

the two programs?

a. both are O(logN)

b. O(logN) and O(NlogN) respectively

c. both are O(N)

d. O(logN) and O(N) respectively

(2)In a singly linked list with N nodes, which operation

requires the time complexity of O(N)?

a. to find the i-th node in the list (1≤i≤N)

b. to insert a new node after the node pointed by p

c. to arrange the nodes of the list in increasing order

d. to delete a node after the node pointed by p

(3)If a queue is implemented by a circular array with size m.

It is given that the front element is at f and the length of the queue is s. Where is the rear element in the queue?

a. f+s

b. f+s-1

c. (f+s-1)%m

d. (f+s)%m

(4)Among the following sorting algorithms, which one has the

properties that for each step at least one element can be placed to its final position and the number of comparisons is NOT related to the initial order of the list to be sorted?

a. Selection sort

b.

sort

Heap

c. Quick sort

d. Insertion sort

(5)If quadratic probing is used, and the table size is prime,

then which one of the following is true?

a. A new element can always be inserted

b. A new element may not be inserted

c. A new element can not be inserted

d. None of the above

(6)To test if there is a cycle in a given digraph, which of the

following method can be used besides topological sort?

Breath-First-Search

a.

b.

Depth-First-Search

c. Critical Path Method

d. Dijkstra Method

(7)The sufficient conditions of a graph of N vertices being a

tree are that the graph must be

a. connected and directed

b. acyclic and directed

c. connected and acyclic

d. containing exactly N-1 edges

(8) A graph of N vertices contains at least , and at

most connected components.

a. 0

b. 1

c. N-1

d. N

相关文档
最新文档