Question: 1.Given a Binary Search Tree as below: a) Put the dummy nodes in appropriate place b) Now illustrate the search operation to search for 4
1.Given a Binary Search Tree as below:
a) Put the dummy nodes in appropriate place
b) Now illustrate the search operation to search for 4 and 12.
c) Illustrate how would you delete the root, and redraw the tree after deleting the root.
d) Write down the pre-order tree traversal data.
e) Write down the post-order tree traversal data.
2. Consider Hashing of the following data:
{11, 400, 37, 56, 220, 125, 78}
Find out the hash value for each key. Assume the hash function as: h(k) = k mod m. Assume size of the hash table as 11. Then illustrate how would you construct the hash table, avoid any collision by using the double hashing. The second hash function is as given below:
h2(k) = 10 (k mod 10)
8 3 10 6 14 4 7 (13
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
