Professional Documents
Culture Documents
UNIT 2
Write a program in C to create an empty binary tree and to search for an element x
into it.
Define binary search tree and write a routine for insert, delete, find, find minimum
and find maximum.
Draw a binary search tree for 10,3,2,8,12,11,15,7,9,1 and also perform delete
operation for 2,3,12 in sequence. Show all 3 cases.
Describe AVL tree and construct the AVL tree for following 10, 2,8,12,11,15,7,9.
Explain with example that how a node is inserted into an AVL tree. Discuss all
possible cases.
UNIT 3
Explain in detail about hashing, separate chaining and linear probing technique.
What is meant by collision resolution in hashing? Explain in detail any one stragey
for dealing in it.
Give input {4371, 1323, 6173, 4199, 4344, 9629, and 1989} and hash function h(x)
= x mod 10.Show the resulting:
c. Quadratic probing
Elucidate the extendible hashing (dynamic hashing) along with example. State its
pros and cons.
Explain the dynamic equivalence problem with an example of smart union algorithm
(find union algorithm) in all 3 types.
UNIT 4
What is topological sort? Apply the same for any graph with your own example.
What is a single source shortest path problem? Discuss Dijkstra’s single algorithm
for the following graph. Consider vertex A as source for FIG 1.1.
Explain the algorithm of depth and breadth first search for the graph in FIG 1.1.
FIG 1.1
Weightage
A to b = 1
A to C =4
B to D = 5
E to C = 8
D to F =3
E to F = 9