Question: mannlig me aine keys, as m (11) above, and a new key ? as in (1), would you expect it to take longer to insert

mannlig me aine keys, as m (11) above, and a new key ? as in (1), would you expect it to take longer to insert k into the binary search tree or into the red-black tree? Assume that all operations common to both insert procedures take the same time. Your answer should explain why the longer insertion takes longer, and how much extra time is taken, in ? notation. b i) What is collision resolution in hash tables and why is it necessary? What is the difference between the result of a hash function used in a table with collision resolution by chaining and one used in a table with probing? ii) Describe how objects are added into a hash table that uses collision resolution by chaining, and one that uses probing. What is the time taken, in the worst case and the average case, to add a new object to each type of table if the table contains N objects and is of size m? iii) Given a hash table containing N objects, briefly describe how you would return all the objects, ordered by key. What would be the time taken by your scheme? State any assumptions that you make. iv) The two parts carry, respectively, 45% and 55% of the marks. mannlig me aine keys, as m (11) above, and a new key ? as in (1), would you expect it to take longer to insert k into the binary search tree or into the red-black tree? Assume that all operations common to both insert procedures take the same time. Your answer should explain why the longer insertion takes longer, and how much extra time is taken, in ? notation. b i) What is collision resolution in hash tables and why is it necessary? What is the difference between the result of a hash function used in a table with collision resolution by chaining and one used in a table with probing? ii) Describe how objects are added into a hash table that uses collision resolution by chaining, and one that uses probing. What is the time taken, in the worst case and the average case, to add a new object to each type of table if the table contains N objects and is of size m? iii) Given a hash table containing N objects, briefly describe how you would return all the objects, ordered by key. What would be the time taken by your scheme? State any assumptions that you make. iv) The two parts carry, respectively, 45% and 55% of the marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
