Data Structures Algorithms-II MCQs

Page No. 41

What will be the recurrence relation of the code of recursive bubble sort?


aT(n) = 2T(n/2) + n

✖


bT(n) = 2T(n/2) + c

✖


cT(n) = T(n-1) + n

✓


d T(n) = T(n-1) + c

✖


View Answer T(n) = T(n-1) + n

Bubble sort is also known as ___________


astupid sort

✖


b ship sort

✖


csinking sort

✓


dshell sort

✖


View Answer sinking sort

Which of the following is an advantage of recursive bubble sort over its iterative version?


ait has better time complexity

✖


b it has better space complexity

✖


c it is easy to implement

✖


d it has no significant advantage

✓



What is the auxiliary space complexity of binary insertion sort?


aO(n)

✖


bO(1)

✓


cO(n log n)

✖


dO(n2)

✖


View Answer O(1)

Choose the correct statement regarding binary insertion sort?


a It has a better time complexity as compared to the standard version

✖


b It has a better space complexity as compared to the standard version

✖


cit takes less number of comparisons in the best case as compared to the standard version

✖


dit takes less number of comparisons in the worst case as compared to the standard version

✓



What is the worst case time complexity of binary 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 binary insertion sort?


aO(n)

✓


b O(n log n)

✖


cO(n2)

✖


d O(log n)

✖


View Answer O(n)

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


aO(n)

✖


bO(N log N)

✖


cO(n2)

✓


dO(log n)

✖


View Answer O(n2)

Binary insertion sort is a comparison based sort.


a true

✓


b false

✖


cA & B

✖


dNone of these

✖


View Answer true

Which of the following sorting algorithm uses a binary search?


aradix sort

✖


bbinary insertion sort

✓


codd-even sort

✖


dbead sort

✖


View Answer binary insertion sort

Goto Page No.

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