Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please only answer the question 1. Please only answer the question 1. 1. (6 points, 2 points each) Show the contents of the final open
Please only answer the question 1.
Please only answer the question 1.
1. (6 points, 2 points each) Show the contents of the final open addressing hash table with an initial size of 5. Each table should rehash when its load factor is about to go over 0.5 because of an insert. Use hi-key % table-size as the hash function for all the parts. Please consider each hash table to be separate, and independent of the other two. a. Linear probing: Insert 14, insert 3, insert 25, delete 14, insert 5, insert 36, insert 15 b. Quadratic probing: Insert 5, insert 13, delete 5, insert 2, insert11, insert 6, insert 24, insert 17 c. Double hashing with h-=(key % 4) + 1: Insert 4, insert 59, insert 15, insert 37, insert 26 2. (2 points) Draw a separate chaining hash table of size 7 (with its linked lists) with hi-key % 7 for the following number being inserted. Numbers are inserted at the front of their r espective lists. 11, 18, 13,21, 9, 6,7, 20,4,25 3. (6 points, 2 points each) Insert 10010 into each of the following extendible hashes with M = 6 a. 10111 00000 1000001111 10101 0101 10110 00111 1000100011 10011 01001 10001 10100 11001 10000 11001 00010 10111 11100 10100 10001 4. (1 point) The isEmpty routine for quadratic probing has not been written. Why cannot you implement it by returning the expression currents ze=-0? Adapted from our text 5.6Step 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