Data Structures Algorithms-II MCQs

Page No. 141

In what time can the Hamiltonian path problem can be solved using dynamic programming?


aO(N)


bO(N log N)


cO(N2)


dO(N2 2N)


View Answer O(N2 2N)

Who formulated the first ever algorithm for solving the Hamiltonian path problem?


aMartello


bMonte Carlo


cLeonard


dBellman


View Answer Martello

Which of the following problems is similar to that of a Hamiltonian path problem?


aknapsack problem


bclosest pair problem


ctravelling salesman problem


d assignment problem



There is no existing relationship between a Hamiltonian path problem and Hamiltonian circuit problem.


atrue


bfalse


cA & B


d None of the above


View Answer false

Hamiltonian path problem is _________


aNP problem


b N class problem


cP class problem


dNP complete problem


View Answer NP complete problem

The problem of finding a path in a graph that visits every vertex exactly once is called?


a Hamiltonian path problem


bHamiltonian cycle problem


cSubset sum problem


dTurnpike reconstruction problem



Which of the following algorithm can be used to solve the Hamiltonian path problem efficiently?


abranch and bound


biterative improvement


cdivide and conquer


dgreedy algorithm


View Answer branch and bound

What will be the worst case time complexity for the following code?


aO(n log n)


bO(n2)


cO(2n)


dO(n2 log n)


View Answer O(2n)

What will be the output for the following code?


a12


b4 6 2


cTrue


dFalse


View Answer True

Which of the following should be the base case for the recursive solution of subset sum problem?


aif(sum==0) return true;


bf(sum==0) return true; if (n ==0 && sum!= 0) return false;


cif (n ==0 && sum!= 0) return false;


dif(sum<0) return true; if (n ==0 && sum!= 0) return false;



Goto Page No.

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