Data Structures Algorithms-II MCQs

Which of the following is a disadvantage of linear search?

aRequires more space

bGreater time complexities compared to other searching algorithms

cNot easy to understand

dNot easy to implement

What is the best case and worst case complexity of ordered linear search?

aO(nlogn), O(logn)

bO(logn), O(nlogn)

c O(n), O(1)

d O(1), O(n)

View Answer O(1), O(n)

What is the worst case for linear search?

a O(nlogn)

b O(logn)



View Answer O(n)

What is the best case for linear search?





View Answer O(1)

Where is linear searching used?

aWhen the list has only a few elements

bWhen performing a single search in an unordered list

cUsed all the time

dWhen the list has only a few elements and When performing a single search in an unordered list

What is the recurrence relation for the linear search recursive algorithm?

a T(n-2)+c

b 2T(n-1)+c

c T(n-1)+c


View Answer 2T(n-1)+c

Can linear search recursive algorithm and binary search recursive algorithm be performed on an unordered list?

aBinary search can’t be used

bLinear search can’t be used

cBoth cannot be used

dBoth can be used

What is the best case runtime of linear search(recursive) algorithm on an ordered set of elements?


b O(n)



View Answer O(1)

The array is as follows: 1,2,3,6,8,10. Given that the number 17 is to be searched. At which call it tells that there’s no such element? (By using linear search(recursive) algorithm)

a 7th call

b9th call

c 17th call

d The function calls itself infinite number of times

View Answer 7th call

The array is as follows: 1,2,3,6,8,10. At what time the element 6 is found? (By using linear search(recursive) algorithm)

a4th call

b 3rd call

c 6th call

d 5th call

View Answer 4th call

Alphabetical MCQs Categories

Here below You find all kind of categories of MCQs in alphabetical order.

BolPakistan 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 © 2022, Designed & Developed by BolPakistan