Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started