Let LIST be a linked list with a node N between nodes A and B
Suppose node N is to be deleted from the linked list.The schematic diagram of such a deletion appears.The deletion occurs as soon as the nextpointer field of node A is changed so that it points to node B.
Suppose our linked list is maintained in memory in the form
LIST(INFO, LINK, START, AVAIL)
When a node N is deleted from our list, we will immediately return its memory space to the AVAIL list.
1. The nextpointer field of node A now points to node B. where node N previously pointed.
2. The nextpointer field of N now points to the original first node in the free pool, where AVAIL previouly pointed.
0 comments:
Post a Comment