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?

DAA-QUIZ

Quiz
•
Computers
•
Professional Development
•
Medium
Pratiba D.
Used 3+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
160
200
170
90
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following methods can be used to solve the Knapsack problem?
Brute force algorithm
Recursion
Dynamic programming
Brute force, Recursion and Dynamic Programming
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following sorting algorithms is the fastest?
Merge sort
Quick sort
Insertion sort
Shell sort
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst case time complexity of a quick sort algorithm?
O(N)
O(N log N)
O(N2)
O(log N)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the average case time complexity of merge sort?
O(n log n)
O(n2)
O(n2 log n)
O(n log n2)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the auxiliary space complexity of merge sort?
O(1)
O(log n)
O(n)
O(n log n)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of the best case scenario for quick sort?
O(N)
O(N log N)
O(N^2)
O(log N)
Create a free account and access millions of resources
Similar Resources on Quizizz
13 questions
DSA + System design - 9

Quiz
•
Professional Development
10 questions
MCA 2024

Quiz
•
Professional Development
12 questions
DSA + System design - 10

Quiz
•
Professional Development
10 questions
Data Structure

Quiz
•
Professional Development
15 questions
Searching and Sorting

Quiz
•
University - Professi...
10 questions
Mastering Algorithms

Quiz
•
Professional Development
10 questions
DSA 1

Quiz
•
Professional Development
13 questions
DSA 2

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade