Question: An alternative to the deletion strategy we have given is to use lazy deletion. To delete an element, we merely mark it deleted (using an
An alternative to the deletion strategy we have given is to use lazy deletion. To delete an element, we merely mark it deleted (using an extra bit field). The number of deleted and nondeleted elements in the list is kept as part of the data structure. If there are as many deleted elements as nondeleted elements, we traverse the entire list, performing the standard deletion algorithm on all marked nodes.
a. List the advantages and disadvantages of lazy deletion.
b. Write routines to implement the standard linked list operations using lazy deletion.
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
a The advantages are that it is simpler to code and the... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
1486-C-S-A(295).docx
120 KBs Word File
