Data Structures Algorithms-II MCQs

Page No. 18

Shell sort algorithm is an example of?


a External sorting


b Internal sorting


cIn-place sorting


dBottom-up sorting


View Answer Internal sorting

Shell sort algorithm is the first algorithm to break the quadratic time barrier.


aTrue


bFalse


cA & B


dNone of these


View Answer True

Who invented the shell sort algorithm?


aJohn Von Neumann


bDonald Shell


cTony Hoare


d Alan Shell


View Answer Donald Shell

What is the other name for a shell sort algorithm?


a Diminishing increment sort


bDiminishing decrement sort


cInsertion sort


d Selection sort



Shell sort is more efficient than insertion sort if the length of input arrays is small.


aTrue


bFalse


cA & B


dNone of these


View Answer False

Records R1, R2, R3,.. RN with keys K1, K2, K3,.. KN are said to be h-ordered, if ________


aKi <= Ki+h for 1<= i*h <= N


bKh <= Ki+h for 1<= i <= N


cKi <= Kh for 1<= i <= h


d Ki <= Ki+h for 1<= i <= N-h



An array that is first 7-sorted, then 5-sorted becomes _________


a 7-ordered


b 5-ordered


cboth 2-ordered and 5-ordered


d both 7-ordered and 5-ordered



Shell sort is an improvement on ____


ainsertion sort


bselection sort


cbinary tree sort


d quick sort


View Answer insertion sort

Shell sort is applied on the elements 27 59 49 37 15 90 81 39 and the chosen decreasing sequence of increments is (5,3,1). The result after the first iteration will be


a27 59 49 37 15 90 81 39


b27 59 37 49 15 90 81 39


c27 59 39 37 15 90 81 49


d15 59 49 37 27 90 81 39



Statement 1: Shell sort is a stable sorting algorithm. Statement 2: Shell sort is an in-place sorting algorithm.


aBoth statements are true


bStatement 2 is true but statement 1 is false


cStatement 2 is false but statement 1 is true


d Both statements are false



Goto Page No.

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