Heap sort is an implementation of ____________ using a descending priority queue.
a) insertion sort
b) selection sort
c) bubble sort
d) merge sort
Q.2.
Which one of the following is false?
a) Heap sort is an in-place algorithm
b) Heap sort has O(nlogn) average case time complexity
c) Heap sort is stable sort
d) Heap sort is a comparison-based sorting algorithm
Q.3.
The essential part of Heap sort is construction of max-heap. Consider the tree shown below, the nodeviolates the max-heap property. Once heapify procedure is applied to it, which position will it be in?
a) 4
b) 5
c) 8
d) 9
Q.4.
The descending heap property is ___________
a) A[Parent(i)] = A[i]
b) A[Parent(i)] <= A[i]
c) A[Parent(i)] >= A[i]
d) A[Parent(i)] > 2 * A[i]
Q.5.
What is its wort case time complexity of Heap sort?
a) O(nlogn)
b) O(n2logn)
c) O(n2)
d) O(n3)
Q.6.
In average case Heap sort is as efficient as the Quick sort.
a) True
b) False
Q.7.
Which one of the following is a variation of Heap sort?
a) Comb sort
b) Smooth sort
c) Binary tree sort
d) Shell sort
Q.8.
Introsort algorithm is combination of _____________
a) Quick sort and Heap sort
b) Quick sort and Shell sort
c) Heap sort and Merge sort
d) Heap sort and insertion sort
Q.9.
How many elements can be sorted in O(logn) time using Heap sort?
a) O(1)
b) O(n/2)
c) O(logn/log(logn))
d) O(logn)
Support mcqgeeks.com by disabling your adblocker.
Please disable the adBlock and continue. Thank you.