Question: Suggest how storage for elements can be allocated and deal located within the hash table itself by linking all unused slots into a free list.

Suggest how storage for elements can be allocated and deal located within the hash table itself by linking all unused slots into a free list. Assume that one slot can store a flag and either one element plus a pointer or two pointers. All dictionary and free-list operations should run in O (1) expected time. Does the free list need to be doubly linked, or does a singly linked free list suffice?

Step by Step Solution

3.50 Rating (170 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The flag in each slot will indicate whether the slot is free A free slot is in the free list a doubly linked list of all free slots in the table The s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

C-S-A (51).docx

120 KBs Word File

Students Have Also Explored These Related Algorithms Questions!