wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DAA Lab Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the Complexity of BUILD_MAX_HEAP function?

a)

O(log n)

b)

O(n log n)

c)

O(n)

d)

None of the above

2.

What is the length of LCS for the following strings?

a. AABACDACC

b. CABBACCBC

a)

4

b)

5

c)

6

d)

7

3.

For Matrix Chain Multiplication what are the missing sizes of matrix in the chain?

4x3, 3x6, 6x?, 5x8, ?x2

a)

5 and 8

b)

6 and 8

c)

5 and 2

d)

6 and 2

4.

Which of the following is a Divide and Conquer algorithm?

a)

Bubble Sort

b)

Heap Sort

c)

Merge Sort

d)

Counting Sort

5.

Heap_Increase_key operation is used for

a)

Increase the depth of the heap

b)

to insert a new node in the heap with given key.

c)

to increase the value of the given index with the new key value

d)

to remove the max value from the heap

6.

What is the lower bound for comparison based sorting algorithms?

a)

nlogn

b)

n2

c)

logn

d)

n

7.

What is true about Hoffman Tree?

a)

Hoffman Tree has n Leaf Nodes and n-1 intermediate nodes

b)

No of bits required to encode a character is its depth + 1

c)

Hoffman Code is a lossy compression algorithm

d)

None of the above is true

8.

What is the order of partition algorithm in quick sort?

a)

O(logn)

b)

O(nlogn)

c)

O(n)

d)

O(1)

9.

In Activity Selection problem, The List is sorted

a)

with respect to finish time in descending order

b)

with respect to start time in descending order

c)

with respect to finish time in ascending order

d)

with respect to start time in ascending order

10.

Order the complexity function in ascending order of their complexity

a. n

b. log n

c. n2

d. n logn

a)

a, b, c, d

b)

c, d, a, b

c)

b, a, d, c

d)

d, c, b, a