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

Related Posts:

  • What is underflow? Underflow:  The term underflow refers to the situation where one wants to delete data from a data structure that is empty, The programmer may handle underflow by printing the message UNDERFLOW If You want to learn abou… Read More
  • What is Overflow? Overflow:   Sometimes new data are to be inserted into a data structure but there is no available space , i.e, the free-storage list is empty.This situation is called overflow. If You want to learn about the techn… Read More
  • Two basic Operation Of Stack Two basic Operation Of Stack:   (a) "PUSH" is the term used to insert an element into a stack. (b) "POP"   is the term used to remove an element into a stack. If You want to learn about the technol… Read More
  • Warshall's Algorithm (Warshall's Algorithm) A directed graph  G with M nodes is maintained in memory by its adjacency matrix A. This algorithm finds the (Boolean) path matrix P of the graph-G 1.  Repeat for I, J = 1, 2......, M: [In… Read More
  • Shortest Path Algorithm (Shortest Path Algorithm) A directed graph  G with M nodes is maintained in memory by its weight matrix W. This algorithm finds a matrix Q such that Q[I,J] is the length of a shortest path from node VI tonode VJ.Infin… Read More

0 comments:

Post a Comment