Data Structures Algorithms-II MCQs

Page No. 92

Under what case of Master’s theorem will the recurrence relation of stooge sort fall?


a 1


b2


c3


dIt cannot be solved using master’s theorem


View Answer 1

Under what case of Master’s theorem will the recurrence relation of merge sort fall?


a1


b2


c3


d It cannot be solved using master’s theorem


View Answer 2

We can solve any recurrence by using Master’s theorem.


atrue


bfalse


cA & B


dNone of these


View Answer false

What is the result of the recurrences which fall under third case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc?


aT(n) = O(nlogba)


bT(n) = O(nc log n)


cT(n) = O(f(n))


dT(n) = O(n2)


View Answer T(n) = O(f(n))

What is the result of the recurrences which fall under second case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc?


aT(n) = O(nlogba)


bT(n) = O(nc log n)


cT(n) = O(f(n))


d T(n) = O(n2)


View Answer T(n) = O(nc log n)

What is the result of the recurrences which fall under first case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc?


aT(n) = O(n^logba)


b T(n) = O(nc log n)


cT(n) = O(f(n))


dT(n) = O(n2)


View Answer T(n) = O(n^logba)

How many cases are there under Master’s theorem?


a 2


b 3


c4


d 5


View Answer 3

Master’s theorem is used for?


asolving recurrences


bsolving iterative relations


canalysing loops


dcalculating the time complexity of any code


View Answer solving recurrences

What will be the time complexity of the following code?


aO(log n)


bO(n)


cO(n log n)


dO(n2)


View Answer O(log n)

What will be the recurrence relation of the following code?


aT(n) = T(n/2) + n


bT(n) = T(n-1) + n


cT(n) = T(n-1) + O(1)


d T(n) = T(n/2) + O(1)



Goto Page No.

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