Data Structures Algorithms-II MCQs

Page No. 20

Introsort algorithm is combination of _____________


aQuick sort and Heap sort

✓


bQuick sort and Shell sort

✖


cHeap sort and Merge sort

✖


dHeap sort and insertion sort

✖



Which one of the following is a variation of Heap sort?


aComb sort

✖


b Smooth sort

✓


cBinary tree sort

✖


dShell sort

✖


View Answer Smooth sort

In average case Heap sort is as efficient as the Quick sort.


aTrue

✖


bFalse

✓


cA & B

✖


dNone of these

✖


View Answer False

The descending heap property is ___________


aA[Parent(i)] = A[i]

✖


bA[Parent(i)] <= A[i]

✖


cA[Parent(i)] >= A[i]

✓


dA[Parent(i)] > 2 * A[i]

✖


View Answer A[Parent(i)] >= A[i]

The essential part of Heap sort is construction of max-heap. Consider the tree shown below, the node 24 violates the max-heap property. Once heapify procedure is applied to it, which position will it be in


a4

✖


b 5

✖


c8

✖


d 9

✓


View Answer 9

Which one of the following is false?


aHeap sort is an in-place algorithm

✖


bHeap sort has O(nlogn) average case time complexity

✖


cHeap sort is stable sort

✓


dHeap sort is a comparison-based sorting algorithm

✖



Heap sort is an implementation of ____________ using a descending priority queue.


ainsertion sort

✖


bselection sort

✓


c bubble sort

✖


dmerge sort

✖


View Answer selection sort

Which of the following sorting algorithm will be preferred when the size of partition is between 16 and 2 log(n) while implementing introsort?


aquick sort

✓


binsertion sort

✖


cheap sort

✖


dmerge sort

✖


View Answer quick sort

What is the cut-off for switching from quick sort to insertion sort in the implementation of introsort?


a4

✖


b8

✖


c16

✓


d16

✖


View Answer 16

Why is insertion sort preferred over other sorting algorithms (like selection sort, bubble sort etc.) for introsort implementation?


aBecause insertion sort is faster and adaptive

✓


bBecause insertion sort requires less space

✖


cBecause insertion sort is easy to implement

✖


d Because insertion sort is easy to understand

✖



Goto Page No.

Page 20 of 149

Alphabetical MCQs Categories
—

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"
—

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan