Data Structures Algorithms-II MCQs

Page No. 2

Linear search(recursive) algorithm used in _____________


aWhen the size of the dataset is low

✓


bWhen the size of the dataset is large

✖


cWhen the dataset is unordered

✖


dNever used

✖



Is the space consumed by the linear search(recursive) and linear search(iterative) same?


aNo, recursive algorithm consumes more space

✓


bNo, recursive algorithm consumes less space

✖


cYes

✖


dNothing can be said

✖



Is there any difference in the speed of execution between linear serach(recursive) vs linear search(lterative)?


aBoth execute at same speed

✖


bLinear search(recursive) is faster

✖


cLinear search(Iterative) is faster

✓


dCant be said

✖



Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations?


a90 and 99

✓


b 90 and 100

✖


c89 and 94

✖


d94 and 99

✖


View Answer 90 and 99

Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are done until the element is found?


a1

✖


b3

✖


c4

✖


d 2

✓


View Answer 2

Binary Search can be categorized into which of the following?


aBrute Force technique

✖


bDivide and conquerDivide and conquer

✓


cGreedy algorithm

✖


dDynamic programming

✖


View Answer Divide and conquer

Which of the following is not an application of binary search?


aTo find the lower/upper bound in an ordered sequence

✖


bUnion of intervals

✖


cDebugging

✖


dTo search in unordered list

✓



Given an array arr = {45,77,89,90,94,99,100} and key = 99; what are the mid values(corresponding array elements) in the first and second levels of recursion?


a90 and 99

✓


b90 and 94

✖


c89 and 99

✖


d89 and 94

✖


View Answer 90 and 99

Given an input arr = {2,5,7,99,899}; key = 899; What is the level of recursion?


a 5

✖


b2

✖


c3

✓


d 4

✖


View Answer 3

What is the advantage of recursive approach than an iterative approach?


aConsumes less memory

✖


bLess code and easy to implement

✓


c Consumes more memory

✖


d More code has to be written

✖



Goto Page No.

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