Data Structures Algorithms-II MCQs

Page No. 34

What is the worst space complexity of bucket sort (k = number of buckets)?


aO(n + k)


bO(n.k)


cO(n2)


dO(n log n)


View Answer O(n.k)

Bucket sort is an in place sorting algorithm.


aTrue


bFalse


ceither A. or B.


d None of these


View Answer False

Which of the following is not necessarily a stable sorting algorithm?


a bucket sort


bcounting sort


cmerge sort


dpigeonhole sort


View Answer bucket sort

What is the best time complexity of bucket sort (k= number of buckets)?


aO(n + k)


bO(n.k)


cO(n2)


dO(n log n)


View Answer O(n + k)

What is the worst case time complexity of bucket sort (k = number of buckets)?


aO(n + k)


bO(n.k)


cO(n2)


dO(n log n)


View Answer O(n2)

Bucket sort is a generalization of which of the following sort?


aLSD radix sort


bPigeonhole sort


cCounting sort


dMSD radix sort


View Answer Pigeonhole sort

Bucket sort is most efficient in the case when __________


a the input is non uniformly distributed


bthe input is uniformly distributed


cthe input is randomly distributed


dthe input range is large



Which of the following don’t affect the time complexity of bucket sort?


aalgorithm implemented for sorting individual buckets


bnumber of buckets used


cdistribution of input


dinput values


View Answer input values

Which of the following is not true about bucket sort?


aIt is a non comparison based integer sort


b It is a distribution sort


cIt can also be considered as comparison based sort


dIt is in place sorting algorithm



Which of the following non-comparison sort can also be considered as a comparison based sort?


acounting sort


bMSD radix sot


cbucket sort


dpigeonhole sort


View Answer bucket sort

Goto Page No.

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