现在的位置: 首页 > 综合 > 正文

微软实习笔试

2013年12月10日 ⁄ 综合 ⁄ 共 1179字 ⁄ 字号 评论关闭

9. Which of the following statements are true?

A. Insertion sort and bubble sort are not efficient for large data sets.

B. Quick sort makes O(n^2) comparisons in the worst case .

C. There is an array:7,6,5,4,3,2,1. If using selection sort(ascending), the number of swap operation is 6.

D. Heap sort uses two heap operations: insertion and root deletion.

E. None of above.

Answer:ABD


11. The Orchid Pavilion(兰亭集序) is well known as the top of "行书" in history of Chinese literature. The most fascinating sentence is "Well I know it is a lie to say that life and death is the same thing and that longevity and early death make no difference Alas!"("固知一生死为虚诞,齐彭殇为妄作。").
By counting the characters of the whole content (in Chinese version), the result should be 391(including punctuation). For these charaters written to a text file ,please select the possible size without any data corrupt.

A. 782 bytes in UTF-16 encoding

B. 784 bytes in UTF-16 encoding

C. 1173 bytes in UTF-8 encoding

D. 1176 bytes in UTF-8 encoding

E.  None of above

Answer:BCD

UTF-16两字节表示一个汉字,有Big Endian和Little Endian两种,必须要加BOM两字节。UTF-8通常三字节一个汉字,有加BOM和不加BOM两种方式。


13. A 3-order B-tree has 2047 key words, what is the maximum height of the tree?

A. 11                B. 12                    C. 13                D. 14

Answer:A

定理9.1 若n≥1,m≥3,则对任意一棵具有n个关键字的m阶B-树,其树高h至多为:
        logt((n+1)/2)+1。
这里t是每个(除根外)内部结点的最小度数,即

        

抱歉!评论已关闭.