This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Zhejiang University Second Semester of 2003 —2004 Academic Year Data Structure & Algorithm Allowed Time: 120m, College: Chu KeChen Honors College Student Name______________ Student ID_____________ Teacher Name __He Qinming__ (Following Form only for Teacher) Item Number 一 (25) 一 (8) 一 (12) 一 (8) 一 (11) 一 (16) 一 (20) mark 一一Single Choice & Blank Filling一2 marks for each item of Single Choice and 3 marks for each item of Blank Filling, total 25 marks一 1、There is a linked list L consisting of an ordered numbers. The size of the list is n . In order to insert a new number x , what is the average time complexity of this operation? A) O(1) B) O(n) C) O(nlogn) D) O(n*n) 2、The degree of each node in a tree of height h is 0 or 2 .(NOTE: the height of a one-node-tree is 0). The number of the nodes in the tree is at least:: A) 2h B) 2h-1 C) 2h+1 D) 2 h-1 3、For a binary tree, the pre-order travel is abdgcefh, the in-order travel is dgbaechf, the post-order travel is : A、bdgcefha B) gdbecfha C) bdgaechf D) gdbehfca 4、In order to get the 10 largest numbers (NOTE: not 10 th ) from 5000 random numbers, what is the best algorithm: A、 Quick Sort B) Heap Sort C)Merge Sort D) Shell Sort 5、If the input to a stack is 1,2,3,4,…,n, and the first output is...
View Full Document
This note was uploaded on 10/20/2011 for the course COMPUTER S 10586 taught by Professor Jilinwang during the Spring '09 term at Zhejiang University.
- Spring '09
- Computer Science