Professional Documents
Culture Documents
____________________
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]