Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

What are the five steps in a currency risk management program?

Answered: 1 week ago

Question

What are the attributes of a technical decision?

Answered: 1 week ago