Data Structures Algorithms-II MCQs

Page No. 105

What is the maximum value that you can get after cutting the rod and selling the pieces?


a10

✖


b11

✖


c12

✓


d13

✖


View Answer 12

Given a rod of length n and the selling prices of all pieces smaller than equal to n, find the most beneficial way of cutting the rod into smaller pieces. This problem is called the rod cutting problem. Which of these methods can be used to solve the rod cutting problem?


aBrute force

✖


bDynamic programming

✖


cRecursion

✖


dBrute force, Dynamic programming and Recursion

✓



For any array, given that at most one element is non-zero, it is ALWAYS possible to reach the end of the array using minimum jumps.


aTrue

✖


bFalse

✓


ceither A. or (b)

✖


d None of these

✖


View Answer False

For a given array, there can be multiple ways to reach the end of the array using minimum number of jumps.


aTrue

✓


bFalse

✖


ceither A. or (b)

✖


d None of these

✖


View Answer True

Consider the following array: {1, 3, 5, 8, 9, 2, 6, 7, 6} What is the minimum number of jumps required to reach the end of the array?


a1

✖


b2

✖


c3

✓


d4

✖


View Answer 3

You are given an array of elements where each array element represents the MAXIMUM number of jumps that can be made in the forward direction from that element. You have to find the minimum number of jumps that are required to reach the end of the array. Which of these methods can be used to solve the problem?


aDynamic Programming

✖


bGreedy Algorithm

✖


cRecursion

✖


dRecursion and Dynamic Programming

✓



The 0-1 Knapsack problem can be solved using Greedy algorithm.


aTrue

✖


bFalse

✓


ceither A. or (b)

✖


d None of these

✖


View Answer False

What is the time complexity of the brute force algorithm used to solve the Knapsack problem?


aO(n)

✖


bO(n!)

✖


cO(2n)

✓


dO(n3)

✖


View Answer O(2n)

Which of the following problems is equivalent to the 0-1 Knapsack problem?


aYou are given a bag that can carry a maximum weight of W. You are given N items which have a weight of {w1, w2, w3,…., wn} and a value of {v1, v2, v3,…., vn}. You can break the items into smaller pieces. Choose the items in such a way that you get the maximum value

✖


bYou are studying for an exam and you have to study N questions. The questions take {t1, t2, t3,…., tn} time(in hours) and carry {m1, m2, m3,…., mn} marks. You can study for a maximum of T hours. You can either study a question or leave it. Choose the questions in such a way that your score is maximized

✓


cYou are given infinite coins of denominations {v1, v2, v3,….., vn} and a sum S. You have to find the minimum number of coins required to get the sum S

✖


dYou are given a suitcase that can carry a maximum weight of 15kg. You are given 4 items which have a weight of {10, 20, 15,40} and a value of {1, 2, 3,4}. You can break the items into smaller pieces. Choose the items in such a way that you get the maximum value

✖



You are given a knapsack that can carry a maximum weight of 60. There are 4 items with weights {20, 30, 40, 70} and values {70, 80, 90, 200}. What is the maximum value of the items you can carry using the knapsack?


a160

✓


b200

✖


c170

✖


d90

✖


View Answer 160

Goto Page No.

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