Data Structures Algorithms-II MCQs

Page No. 143

Which of the following is not true about set partition problem?


athe recursive solution has a time complexity of O(2n)


bthere is no known solution that takes polynomial time


cthe recursive solution is slower than dynamic programming solution


dthe dynamic programming solution has a time complexity of O(n log n)



Recursive solution of Set partition problem is faster than dynamic problem solution in terms of time complexity.


atrue


bfalse


cA & B


dNone of the above


View Answer false

Set partition problem is an example of NP complete problem.


atrue


bfalse


cA & B


dNone of the above


View Answer true

What is the worst case time complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?


aO(n)


bO(sum)


cO(n2)


dO(sum*n)


View Answer O(sum*n)

Which of the following is true about the time complexity of the recursive solution of set partition problem?


a It has an exponential time complexity


bIt has a linear time complexity`


cIt has a logarithmic time complexity


dit has a time complexity of O(n2)



What is the set partition problem?


afinding a subset of a set that has sum of elements equal to a given number


b checking for the presence of a subset that has sum of elements equal to a given number


cchecking whether the set can be divided into two subsets of with equal sum of elements and printing true or false based on the result


dfinding subsets with equal sum of elements



What is meant by the power set of a set?


asubset of all sets


bset of all subsets


cset of particular subsets


dan empty set


View Answer set of all subsets

Consider a reference string 1,2,3,2,1,5,2,1,6,2,5,6,3,1,3,6,1,2,4,3 of frame size 3. Calculate the number of page faults using optimal page replacement algorithm.


a12


b 16


c14


d15


View Answer 14

Consider a reference string 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 of frame size 4. Calculate the number of page faults using optimal page replacement algorithm.


a7


b 9


c8


d6


View Answer 8

Consider a reference string 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 of frame size 3. Calculate the number of page faults using optimal page replacement algorithm.


a 10


b 9


c8


d7


View Answer 9

Goto Page No.

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