Data Structures Algorithms-II MCQs

Page No. 8

Which of the following is a sub string of “SANFOUNDRY”?


aSANO


b FOUND


c SAND


dFOND


View Answer FOUND

Which of the following examples represent the worst case input for an insertion sort?


aarray in sorted order


barray sorted in reverse order


cnormal unsorted array


dlarge array



For the best case input, the running time of an insertion sort algorithm is?


aLinear


bBinary


cQuadratic


d Depends on the input


View Answer Linear

Which of the following sorting algorithms is the fastest for sorting small arrays?


a Quick sort


b Insertion sort


cShell sort


dHeap sort


View Answer Insertion sort

Which of the following options contain the correct feature of an insertion sort algorithm?


a anti-adaptive


b dependable


cstable, not in-place


dstable, adaptive


View Answer stable, adaptive

Binary search can be used in an insertion sort algorithm to reduce the number of comparisons.


aTrue


bFalse


cA & B


dNone of these


View Answer True

In C, what are the basic loops required to perform an insertion sort?


ado- while


bif else


cfor and while


dfor and if


View Answer if else

Which of the following real time examples is based on insertion sort?


aarranging a pack of playing cards


bdatabase scenarios and distributes scenarios


carranging books on a library shelf


d real-time systems



For the following question, how will the array elements look like after second pass? 34, 8, 64, 51, 32, 21


a8, 21, 32, 34, 51, 64


b8, 32, 34, 51, 64, 21


c8, 34, 51, 64, 32, 21


d8, 34, 64, 51, 32, 21


View Answer 8, 34, 64, 51, 32, 21

What will be the number of passes to sort the elements using insertion sort?14, 12,16, 6, 3, 10


a6


b 5


c7


d 1


View Answer 5

Goto Page No.

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