Question
Problem1: Please build the min-heap tree for the following given inputs: A=[23, 1, 0, 56, 12, 13, 34, -1, 16, 8] Then show the tree
Problem1: Please build the min-heap tree for the following given inputs:
A=[23, 1, 0, 56, 12, 13, 34, -1, 16, 8]
Then show the tree after each applying each of the following operations(the ordering of the operations is 1, 2, 3, 4, 5, 6, and 7):
1)removeMin() (removes the root)
2)Insert (10)
3)removeMin()
4)Insert (-5)
5)removeMin()
6)Insert (-8)
7)removeMin()
Problem2: Insert keys: 15, 11, 22, 18, 43, 52, 23, 73, 5, 44, 59, 32, 31 respectively to a hash table by using the following three methods:
1)h(x) = x mod 13 and Separate Chaining
2)h(x) = x mod 13 and Linear Probing
3)Double hashing ((i + jd(k)) mod N for j = 0, 1, ... , N 1) if N = 13, h(k) = k mod 13, and d(k) = 7 -k mod 7 (Note: i=h(k)).
Today pls.
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