Sei sulla pagina 1di 2

Class Test 1

All questions are compulsory.

Marks = 30

Time

Q1

Define A. Algorithm B. Heaps C. Time Complexity D. Divide & Conquer (8)

Q2

Give the pseudo code of quick Sort and Perform Quick Sort on the set of following no. 258,261,25,78,16,861,450,562,170,134,189,140,345

(6)

Q3

Solve the following recurrence relation T (n) = 2T (n) + log2n

(5)

Q4

Give the pseudo code of heap sort

(5)

Q5

T(n)= 7T(n/2)+n2 T(n)= T(9n/10)+n Solve this using Master Method?

Log27=2.81

(6)

All The Best

Test 2

All questions are compulsory.

Marks = 30

Time

Q1

Explain the criteria to select an algorithm and discuss the analysis of Insertion sort give its best case, worst case and average case analysis? (8)

Q2

Give the best, worst, average case analysis of Quick sort?

(8)

Q3

Consider the graph G = (V, E) given below


1

1 6

2 5 8 7 3

4
4

4 3
5

6
6

4
7

Find the minimum spanning tree by kruskals and prims algorithm Q4 What do you mean by radix sort? Implement it in the following example COW, DOG, SEA, RUG, ROW, MOB, BOX, TAB, BAR, EAR, TAR, DIG, BIG, TEA, NOW, FOX
All The Best