You are on page 1of 2

OLD QUESTION PAPER:

Q: ( Answer the Following. (Each question carries two marks). [10


1 A ]
)
(i) Why rehashing is needed? State different ways in which rehashing can be
implemented.
(ii What is amortized Analysis? Explain in brief.
)
(ii Differentiate between Dynamic and Greedy Approach of Algorithms.
i)
(i What is splay tree?
v)
(v Differentiate between DFS (Depth First Search) and BFS (Breath First Search).
)

Q: ( Write a recursive pseudo code for Preorder and In Order traversal of a binary [04
2 A Search tree. ]
)
( Construct the open hash table (separate chaining) and closed hash table (open [06
B addressing – use linear probing) for the input: 32, 20, 56, 77, 40, 81, 63, 76, 37, ]
) 90 using the hash function h(k) = k mod 10. Explain each step in detail.

Q: ( What is Skip list? Write pseudo code for inserting a node in skip list. [05
3 A ]
)
( Insert the following letters into an empty B-tree of order 5: [05
B CNGAHEKQMFWLTZDPRXYS ]
)
OR
( What is K-D Tree? Create K-D Tree for inserting (3, 6), (17, 15), (13, 15), (6, [05
B 12), (9, 1), (2, 7), (10, 19) values. Delete (13, 15) and (2, 7). Draw tree after each ]
) operation.

Q: ( Which data structures can be used for 1-D Range searching? Explain any one [05
4 A with suitable example. ]
)
( What are tries? Generate tries for the following keys. [05
B banana, ban, banner, ball, basket ]
)
OR
( Write a pseudo code to delete a key from trie [05
B ]
)

Q: ( What is TSP (Travelling Salesman Problem)? How approximation algorithm [05


5 A solve this problem. ]
)
( Will the root of red-black tree always be black after performing deletion [05
B operation? Justify with an example. Also draw red black tree for following keys: ]
) 7, 5, 9, 8, 11, 10, 12
OR

Page 1 of 2
( Construct a priority search tree for the point set of given below: [05
B {(1, 2), (4, 10), (14, 3), (6, 6), (3, 15), (2, 2), (3, 12), (9, 4), (12, 14)}. ]
)

Q: ( Explain P, NP, NP-hard and NP-Complete categories of problems. [05


6 A ]
)
( Draw a quad tree for the following set of points, assuming a 10 × 10 bounding [05
B box: ]
) {(3, 7), (8, 1), (6, 6), (2, 6), (1, 7), (8, 6), (5, 9)}.
OR
( Construct a splay tree for following data. [05
B 25, 20, 50, 30, 40, 100, 200 ]
)

Page 2 of 2

You might also like