Data Structures Algorithms-II MCQs

Page No. 102

What is the time complexity of the recursive implementation used to find the nth fibonacci term?


aO(1)


bO(n2)


cO(n!)


dExponential


View Answer Exponential

The following sequence is a fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21,….. Which technique can be used to get the nth fibonacci term?


aRecursion


bDynamic programming


cA single for loop


dRecursion, Dynamic Programming, For loops



You are given infinite coins of denominations 3, 5, 7. Which of the following sum CANNOT be achieved using these coins?


a15


b16


c17


d4


View Answer 17

You are given infinite coins of denominations 5, 7, 9. Which of the following sum CANNOT be achieved using these coins?


a50


b21


c21


d23


View Answer 21

You are given infinite coins of denominations 1, 3, 4. What is the minimum number of coins required to achieve a sum of 7?


a1


b2


c3


d4


View Answer 2

You are given infinite coins of denominations 1, 3, 4. What is the total number of ways in which a sum of 7 can be achieved using these coins if the order of the coins is not important?


a4


b3


c5


d6


View Answer 5

Suppose you are given infinite coins of N denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. What is the space complexity of a dynamic programming implementation used to solve the coin change problem?


aO(N)


bO(S)


cO(N2)


dO(S*N)


View Answer O(S)

Suppose you have coins of denominations 1,3 and 4. You use a greedy algorithm, in which you choose the largest denomination coin which is not greater than the remaining sum. For which of the following sums, will the algorithm produce an optimal answer?


a14


b10


c6


d100


View Answer 100

Suppose you have coins of denominations 1, 3 and 4. You use a greedy algorithm, in which you choose the largest denomination coin which is not greater than the remaining sum. For which of the following sums, will the algorithm NOT produce an optimal answer?


a20


b12


c6


d5


View Answer 6

You are given infinite coins of denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. This problem can be solved using ____________


aGreedy algorithm


bDynamic programming


cDivide and conquer


dBacktracking


View Answer Dynamic programming

Goto Page No.

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