题目内容

How is the weather in Shanghai?

A. The weather in Shanghai is fine, sunny but not too hot.
B. The weather in Shanghai is cloudy.
C. The weather in Shanghai is not too cold.
D. It's going to rain in Shanghai.

查看答案
更多问题

假定对元素序列(7, 3, 5, 9, 1, 12)进行堆排序,并且采用小根堆,则由初始数据构成的初始堆为()。

A.1, 3, 5, 7, 9, 12
B.1, 3, 5, 9, 7, 12
C.1, 5, 3, 7, 9, 12
D.1, 5, 3, 9, 12, 7

在对n个元素进行堆排序的过程中,空间复杂度为()。

A.O(1)
B.O(log2n)
C.O(n2)
D.O(nlog2n)

假定一个初始堆为(1, 5, 3, 9, 12, 7, 15, 10),则进行第一趟堆排序后得到的结果为()。

A.3, 5, 7, 9, 12, 10, 15, 1
B.3, 5, 9, 7, 12, 10, 15, 1
C.3, 7, 5, 9, 12, 10, 15, 1
D.3, 5, 7, 12, 9, 10, 15, 1

在对n个元素进行快速排序的过程中,若每次划分得到的左、右两个子区间中元素的个数相等或只差一个,则整个排序过程得到的含两个或两个元素的区间个数大致为()。

A.n
B.n/2
C.log2n
D.2n

答案查题题库