Data Structures Algorithms-II MCQs

Page No. 33

Which of the following statement is true about comparison based sorting?


a counting sort is a comparison based sort


bany comparison based sorting can be made stable


cbubble sort is not a comparison based sort


dany comparison based sort requires at least O(n2) time



The complexity of which of the following sorting algorithms remains to be the same in its best, average and worst case?


aquick sort


binsertion sort


ccounting sort


dgnome sort


View Answer counting sort

What is the average time complexity of counting sort?


aO(n)


bO(n+k) k=range of input


cO(n2)


d O(n log n)



Which of the following uses the largest amount of auxiliary space for sorting?


aBubble sort


bCounting sort


cQuick sort


dHeap sort


View Answer Counting sort

Which of the following sorting techniques is stable?


aquick sort


bcounting sort


cheap sort


dselection sort


View Answer counting sort

It is not possible to implement counting sort when any of the input element has negative value.


a True


b False


cA & B


dNone of these


View Answer False

What is the auxiliary space requirement of counting sort?


a O(1)


b O(n)


cO(log n)


d O(n+k) k=range of input



Which of the following sorting techniques is most efficient if the range of input data is not significantly greater than a number of elements to be sorted?


aselection sort


bbubble sort


ccounting sort


d insertion sort


View Answer counting sort

Which of the following is not an example of non comparison sort?


abubble sort


bcounting sort


cradix sort


dbucket sort


View Answer bubble sort

How many comparisons will be made to sort the array arr={1,5,3,8,2} using counting sort?


a5


b7


c9


d0


View Answer 0

Goto Page No.

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