wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DAA quiz2

Total questions: 15

Worksheet time: 44mins

Name
Class
Date
1.

The algorithms like merge sort, quick sort and binary search are based on

a)

Greedy algorithm

b)

Divide and Conquer algorithm

c)

Hash table

d)

Parsing

2.

The step(s) in the Divide and conquer process :

a)

Conquer/Solve

b)

Merge/Combine

c)

Divide/Break

d)

Both B and C

3.

In the Divide and Conquer process, breaking the problem into smaller sub-problems is the responsibility of

a)

Divide/Break

b)

Sorting/Divide

c)

Conquer/Solve

d)

Merge/Combine

4.

a)

(P)->(III),(Q)->(II),(R)->(I)

b)

(P)->(II),(Q)->(I),(R)->(III)

c)

(P)->(I),(Q)->(II),(R)->(III)

d)

(P)->(II),(Q)->(III),(R)->(I)

5.
a)

C11=80, C12=07,C21=15, C22=34

b)

C11=82, C12=26 ,C21=10, C22=34

c)

C11=15, C12=07 ,C21=18, C22=34

d)

C11=26, C12= 10 ,C21=82, C22=34

6.

Selection problem is to:

a)

find the largest number present in the given list

b)

find the smallest number present in the given list

c)

find the kth smallest number present in the given list

d)

none

7.

Which one of the below problem cannot be solved using divide and conquer approach:

a)

mergesort

b)

quicksort

c)

heapsort

d)

binary search

8.
a)
b)
c)
d)
9.

Fractional knapsack problem is solved most efficiently by which of the following algorithm?

a)

Divide and conquer

b)

Dynamic programming

c)

Greedy algorithm

d)

Backtracking

10.

What is the objective of the knapsack problem?

a)

To get maximum profit value in the knapsack

b)

To get minimum profit value in the knapsack

c)

To get maximum weight in the knapsack

d)

To get minimum weight in the knapsack

11.

Given items as {value,weight} pairs {{40,20},{30,10},{20,5}}. The capacity of knapsack=20. Find the maximum value output assuming items to be divisible.

a)

60

b)

80

c)

100

d)

40

12.
a)

1

b)

2

c)

3

d)

all

13.

a)

147

b)

150

c)

135

d)

none

14.

...........................technique is used by solving optimization problems

a)

divide and conquer

b)

greedy method

c)

dynamic programming

d)

both b and c

15.

.................technique doesn't give guarantee that our solution is optimal

a)

greedy method

b)

dynamic programming approach

c)

backtracking

d)

branch and bound