对n个元素进行快速排序时,最坏情况下的时间复杂度为(55)。
A.O(log2n)
B.O(n)
C.O(nlog2n)
D.O(n2)
第1题:
用归并排序方法,在最坏情况下的时间复杂度为( )。
A.O(n+1)
B.O(n2)
C.O(log2n)
D.O(nlog2n)
第2题:
对n个元素进行堆排序时,最坏情况下的时间复杂度为(53)。
A.O(log2n)
B.O(n)
C.O(nlog2n)
D.O(n2)
第3题:
对n个元素进行直接插入排序时间复杂度为()。 A. O(1) B. O(n) C. O(n2) D. O(log2n)
第4题:
对n个元素进行堆排序时,其空间复杂度为( )。
A.O(log2n)
B.O(n log2n)
C.O(n)
D.O(1)
第5题:
对n个元素进行快速排序时,最坏情况下的时间复杂度为______。
A.O(log2n)
B.O(n)
C.O(nlog2n)
D.O(n2)