Question: 1 . The Knapsack problem is an example of _ _ _ _ _ _ _ _ _ _ _ _ a ) Greedy algorithm

1. The Knapsack problem is an example of ____________
a) Greedy algorithm
b)2D dynamic programming
c)1D dynamic programming
d) Divide and conquer
2. Which of the following methods can be used to solve the Knapsack problem?
a) Brute force algorithm
b) Recursion
c) Dynamic programming
d) Brute force, Recursion and Dynamic Programming
3. 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?
a)160
b)200
c)170
d)90
4. What will be the number of passes to sort the elements using insertion sort?
14,12,16,6,3,10
a)6
b)5
c)7
d)1
5. Which of the following real time examples is based on insertion sort?
a) arranging a pack of playing cards
b) database scenarios and distributes scenarios
c) arranging books on a library shelf
d) real-time systems

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!