Data Structures Algorithms-II MCQs

Page No. 27

The initial gap between two elements being compared _______


ais equal to number of elements in the array


b is equal to 1.3


cdepends on the number of iterations


ddepends on the compiler being used



The gap between two elements being compared shrinks by a factor of _______ after every iteration.


a 1.1


b1.2


c1.3


d1.4


View Answer 1.3

Comb sort is an improved version of _______


aSelection sort


b Bubble sort


cInsertion sort


d Merge sort


View Answer Bubble sort

Gnome sort uses which of the following method to implement sorting?


aMerging


bPartitioning


c Selection


d Exchanging


View Answer Exchanging

The given array is arr = {1,2,4,3,5}.The number of iterations required to sort the array using gnome sort will be _________


a5


b6


c7


d 8


View Answer 6

Auxiliary space used by gnome sort is _________


aO(1)


b O(n)


cO(log n)


dO(n log n)


View Answer O(1)

Which of the following pair of sorting algorithms are stable?


agnome sort and quick sort


b merge sort and selection sort


cgnome sort and merge sort


d heap sort and merge sort



How many loops are required to implement gnome sorting algorithm?


aSingle loop


b2 nested loops


c3 nested loops


d It does not require any loop


View Answer Single loop

Gnome sort is also called __________


aSmart sort


bStupid sort


cBogo sort


dSpecial sort


View Answer Stupid sort

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


a true


bfalse


cA & B


dNone of these


View Answer false

Goto Page No.

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