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
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
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
C-S-A (51).docx
120 KBs Word File
