HU Amortized Analysis Question

Q5 Amortized analysis 1
13 Points
You have a hash table of size 4, containing 1 element. As you know, performance deteriorates
when the load factor increases. You decide that you want the load factor to be at most 0.75 at
all times. You also want to be reasonably efficient in terms of space used, so you decide that
the load factor should always be at least 0.25.
You need to add many more elements to the set that you’re maintaining. No deletions.
(a) Precisely how will you deal with this?
Only describe what you will do, trying to optimize in a precise manner.
The analysis is done in part b, not here.
Enter your answer here
(b) You end up with n elements in your set. The cost of inserting everything equals standard
hashing costs plus whatever you do in (a). What is the total cost of only the latter part?
(Explain, and try to optimize as much as possible)
Enter your answer here

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER