Data Structures Algorithms-II MCQs

Page No. 17

What is the purpose of using a median of three quick sort over standard quick sort?


aso as to avoid worst case time complexity


b so as to avoid worst case space complexity


c to improve accuracy of output


d to improve average case time complexity



What is the median of three techniques in quick sort?


aquick sort with random partitions


b quick sort with random choice of pivot


cchoosing median element as pivot


dchoosing median of first, last and middle element as pivot



Quick sort uses which of the following algorithm to implement sorting?


abacktracking


bgreedy algorithm


cdivide and conquer


dDynamic programming


View Answer divide and conquer

What is the general form of Shell’s increments?


a1,2,3,…,n


b 1,3,7,….,2k-1


c 1,3,5,7,….,k-1


d1,5,10,15,…, k-1


View Answer 1,3,7,….,2k-1

On how many increment sequences does the worst case analysis of shell sort depends?


aone


btwo


cthree


dfour


View Answer three

Which of the following statements is the basic for loop for a shell sort algorithm?


afor(increment=N/2;increment>0;increment/=2)


b for(i=1;i


cfor(i=n/2;i>=0;i- -)


d for(i=0;i< n;i++;numelements- -)



Given an array of the following elements 81,94,11,96,12,35,17,95,28,58,41,75,15. What will be the sorted order after 5-sort?


a1,12,15,17,28,35,41,58,75,81,94,95,96


b28,12,11,35,41,58,17,94,75,81,96,95,15


c35,17,11,28,12,41,75,15,96,58,81,94,95


d12,11,15,17,81,94,85,96,28,35,41,58,75



Why is Shell sort called as a generalization of Insertion sort?


aShell sort allows an exchange of far items whereas insertion sort moves elements by one position


b Improved lower bound analysis


cInsertion is more efficient than any other algorithms


d Shell sort performs internal sorting



Which of the following sorting algorithms is closely related to shell sort?


aSelection sort


bMerge sort


cInsertion sort


dBucket sort


View Answer Insertion sort

Shell sort uses a sequence called a incrementing sequence to sort the elements.


aTrue


b False


cA & B


dNone of these


View Answer True

Goto Page No.

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