Professional Documents
Culture Documents
DSA Prelim Paper
DSA Prelim Paper
DSA Prelim Paper
1. Solve questions Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8
2. Neat diagrams must be drawn wherever necessary
3. Assume suitable data, if necessary.
Q.1 a) What is recursion, Explain the use of stack in recursion with example [9]
b) Find Minimum spanning tree using Prim’s and Kruskal’s algorithm , write cost of [9]
spanning tree
OR
Q.6 a) Construct step by step an AVL tree for the values 25,12,17,30, 15,14,37,27,40,29,28. [8]
b) Construct heap for the list : 23 , 7, 92, 6, 12, 14, 40, 44, 20, 21 and sort it in ascending [9]
order. Show all steps graphically by drawing the tree at each step.