You are on page 1of 1

Enrollment No.

____________________

G. H. PATEL COLLEGE OF ENGINEERING & TECHNOLOGY


(CONSTITUENT INSTITUTION OF CVMU)
ME – SEMESTER - 1 INTERNAL EXAMINATION – DECEMBER 2021
102340103 Advance Data Structure and Algorithms
Date: 16-12-2021 Time: 11.30 A.M. to 12.30 P.M. Maximum Marks: 40

Instructions:
1. Figures on the right indicate full marks.
2. Make the suitable assumption if required, do specify the same.
Q. (A) Answer the Following. [08]
1
(i) Explain Linked List. [3]
(ii) Explain Amortize analysis in brief. [3]
(iii) Construct a binary search tree by inserting the keys 4, 12, 8, 16, 6, 18, 24, 2, 14, 3. [2]
Draw the tree following each insert.
Q. (A) Explain Linear Probing in hashing with suitable example. [05]
2
(B) Given the frequencies of each letter, generate a Huffman tree and generate [05]
Huffman code for each letter. a --> 11, b --> 16, c --> 12, d --> 3, e --> 4,f --> 13, g -->
1.
(C) You are given a knapsack that can carry a max weight of 6. There are four items [06]
with weights {2, 3, 4, 7} and Values {7, 8, 9, 20}. What is the maximum value of the
items you can carry using the given knapsack? Solve using Dynamic Programming.
OR
(C) Insert the following values in empty Splay Tree: 2, 6, 3, 9, 12, 4, 78, 36 [06]

Q. (A) Explain rehashing with suitable example. [05]


3
(B) Explain Greedy approach for solving optimization problem with suitable example. [05]
(C) Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(X)= [06]
X(mod 10) show the resulting:
1. Open addressing hash table using linear probing.
2. Open addressing hash table using quadratic probing.
OR
(C) Show the result of inserting the keys 10111101, 00000010, 10011011, 10111110, [06]
01111111, 01010001, 10010110, 00001011 into an initially empty extensible
hashing data structure with M=4.

* * * * * * * * ALL THE BEST * * * * * * * *

You might also like