Data Structures Algorithms-II MCQs

Page No. 42

How many comparisons will be made in the worst case when an array of size n will be sorted by using a binary insertion sort algorithm?


a n

✖


b1

✖


c log n

✓


dn log n

✖


View Answer log n

Binary Insertion sort is an online sorting algorithm.


a True

✓


bFalse

✖


cA & B

✖


dNone of these

✖


View Answer True

Which of the following is an advantage of binary insertion sort over its standard version?


ait has better time complexity

✖


b it has better space complexity

✖


cit makes less number of comparisons

✓


dit has no significant advantage

✖



Which of the following sorting algorithm is in place?


arecursive insertion sort

✓


b merge sort

✖


cradix sort

✖


d counting sort

✖



Which of the following is an adaptive sorting algorithm?


a recursive insertion sort

✓


bmerge sort

✖


cheap sort

✖


d selection sort

✖



What is the auxiliary space complexity of recursive insertion sort?


a O(n)

✖


bO(1)

✓


c O(n log n)

✖


dO(n2)

✖


View Answer O(1)

How many swaps will be required in the worst case to sort an array having n elements using binary insertion sort?


an

✖


b1

✖


cn * log n

✖


d log n

✓


View Answer log n

What is the worst case time complexity of recursive insertion sort?


aO(n)

✖


bO(n log n)

✖


cO(n2)

✓


dO(log n)

✖


View Answer O(n2)

What is the best case time complexity of recursive insertion sort?


aO(n)

✓


b O(n log n)

✖


cO(n2)

✖


dO(log n)

✖


View Answer O(n)

What is the average case time complexity of recursive insertion sort?


a O(n)

✖


bO(n log n)

✖


cO(n2)

✓


d O(log n)

✖


View Answer O(n2)

Goto Page No.

Page 42 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