Text: Prompt and ASAP help and response to this question will be highly upvoted. Thank you!
Consider inserting keys 43, 62, 64, 97, 80, 101, 82, 51 into a hash table of size m = 17 (i.e., the hash table index is from 0 to 16) using open addressing with the primary hash function hi(k) = k mod m. Show the result of inserting these keys using i) linear probing; ii) quadratic probing: hk,i = (h1(k) + i + i^2) mod m; and iii) double hashing: hk,i = (hk + i * h2(k)) mod m, where h2(k) = (k mod 13 + k mod 5). [You do NOT need to show the intermediate steps.]
Consider the following hash function: hk,i = h'k + i mod m, where m is a prime number greater than 3. Show that the first [m/2] probe positions in the probe sequence (for any key k) will cover different slots in the hash table or argue that it is not possible.
Given the following set of numbers: 45, 55, 65, 75, 85, 95, 105, 115, 125, 135. Show an AVL tree that stores these numbers. Indicate the balance factor for each node in your illustration (0: balanced; +1: left subtree is taller; -1: right subtree is shorter).
Answer each of the following:
i. How many rotations (in asymptotic notation) are needed in the worst case when you insert a new node in an AVL tree?
ii. How many rotations (in asymptotic notation) are needed in the worst case when you delete a node from an AVL tree?