I.Show how the following BST in would look like after performing the following operations. ALWAYS start from the original tree: See image.

Questions:

  • Deleting 43 using the predecessor substitution approach
  • Deleting 76 using the successor substitution approach
  • Adding 22 then Adding 21
  • Deleting 11 using the predecessor substitution approach

II-For this exercise, use the following modular arithmetic hashing function to find the index of the element in the hash table: Hash(x) = x mod 7

  • Using Open Addressing with Quadratic Probing, show how the table HT would look like after inserting the following elements in this order: 10, 12, 14, 11, 13, 25.
  • Using Chaining (Open Hashing) hashtable HT of size 7 and the same hashing function, show how the table HT would look like after inserting the following elements in this order: 10, 12, 14, 11, 13, 25.
  • Using Open Addressing with Linear Probing, show how the following hash table HT and the Deleted table would like if we delete the values 10 and 18, and then inserted 26 and 12 ? (use the same hashing function Hash(x) = x mod 7)

Note: The technique that happened for after removal was to re-hash the remaining values.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.