Data Structures Algorithms-II MCQs

Page No. 39

What is the space complexity of stooge sort?


aO(n)


bO(1)


cO(log n)


d O(n log n)


View Answer O(n)

In which of the following case stooge sort is most efficient (in terms of time complexity)?


awhen input array is already sorted


bwhen input array is reverse sorted


cwhen input array is large


d it has the same time complexity in any case



What is the recurrence relation for stooge sort?


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


bT(n) = 2T(2/3n) + O(1)


cT(n) = 3T(2/3n) + O(n)


dT(n) = 3T(2/3n) + O(1)



Which one of the following sorting algorithm requires recursion?


aodd even sort


b stooge sort


cselection sort


dcounting sort


View Answer stooge sort

What is the average case time complexity of permutation sort?


aO(n2)


bO(n*n!)


cO(infinity)


dO(n log n)


View Answer O(n*n!)

Sleep sort should be preferred over permutation sort as it has better time complexity.


atrue


b false


cA & B


dNone of these


View Answer false

Which of the following is an in-place sorting algorithm?


aMerge sort


bPermutation sort


cRadix sort


dCounting sort


View Answer Permutation sort

What is the worst case time complexity of permutation sort?


aO(n2)


bO(n*n!)


cO(infinity)


dO(n log n)


View Answer O(infinity)

What is the best case time complexity of permutation sort?


aO(n2)


bO(n)


cO(n log n)


dO(1)


View Answer O(n)

What is the auxiliary space requirement of permutation sort?


aO(n)


b O(1)


c O(log n)


dO(n log n)


View Answer O(1)

Goto Page No.

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