Explore topic-wise MCQs in Heapsort Multiple Choice.

This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Heapsort Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the average number of comparisons used to heap sort a random permutation of N distinct items?

A. 2N log N-O(N)
B. 2N log N-O(N log N)
C. 2N log N-O(N log log N)
D. 2N log N-O(log N)
Answer» D. 2N log N-O(log N)
2.

What is the time taken to copy elements to and from two arrays created for deletion?

A. O(N)
B. O(N log N)
C. O(log N)
D. O(N<sup>2</sup>)
Answer» B. O(N log N)
3.

What is the average number of comparisons used in a heap sort algorithm?

A. N log N-O(N)
B. O(N log N)-O(N)
C. O(N log N)-1
D. 2N log N + O(N)
Answer» E.
4.

Heap sort is an extremely stable algorithm.

A. true
B. false
Answer» B. false
5.

What is the time taken to perform a delete min operation?

A. O(N)
B. O(N log N)
C. O(log N)
D. O(N<sup>2</sup>)
Answer» D. O(N<sup>2</sup>)
6.

How many arrays are required to perform deletion operation in a heap?

A. 1
B. 2
C. 3
D. 4
Answer» C. 3
7.

What is the typical running time of a heap sort algorithm?

A. O(N)
B. O(N log N)
C. O(log N)
D. O(N<sup>2</sup>)
Answer» C. O(log N)
8.

In heap sort, after deleting the last minimum element, the array will contain elements in?

A. increasing sorting order
B. decreasing sorting order
C. tree inorder
D. tree preorder
Answer» C. tree inorder
9.

In what position does the array for heap sort contains data?

A. 0
B. 1
C. -1
D. anywhere in the array
Answer» B. 1
10.

Heap sort is faster than Shell sort.

A. true
B. false
Answer» C.
11.

In what time can a binary heap be built?

A. O(N)
B. O(N log N)
C. O(log N)
D. O(N<sup>2</sup>)
Answer» B. O(N log N)
12.

On which algorithm is heap sort based on?

A. Fibonacci heap
B. Binary tree
C. Priority queue
D. FIFO
Answer» D. FIFO