Follow

Translate

Monday, March 21, 2016

DELETION FROM A LINKED LIST


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.

3.  AVAIL now points to the deleted node N.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

0 comments:

Post a Comment