# YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

## Heapsort Multiple choice Questions and Answers (MCQs)

Question 6 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

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

increasing sorting order | |

decreasing sorting order | |

tree inorder | |

tree preorder |

Question 6 Explanation:

By logic, after deleting minimum element, the heap will contain elements in decreasing sorting order. We can change this by altering the ordering property.

Question 7 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

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

O(N) | |

O(N log N) | |

O(log N) | |

O(N ^{2}) |

Question 7 Explanation:

The total running time of a heap sort algorithm is mathematically found to be O(N log N).

Question 8 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

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

1 | |

2 | |

3 | |

4 |

Question 8 Explanation:

To perform deletion operation in a heap, we require 2 arrays and that occupies extra memory space and hence increase in running time.

Question 9 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

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

O(N) | |

O(N log N) | |

O(log N) | |

O(N ^{2}) |

Question 9 Explanation:

The time taken to perform a deletion of a minimum element is mathematically found to be O( log N).

Question 10 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

Heap sort is an extremely stable algorithm.

true | |

false |

Question 10 Explanation:

Heap sort uses fewer comparisons than other sorting algorithms and hence it is an extremely stable algorithm.

There are 10 questions to complete.