data structures using case the first node is deleted case the last node is deleted case the node after given node is deleted case the node before given node is deleted deleting the first node from doubly linked list consider the doubly linked list shown in fig when we want to delete node from the beginning of the listthen the following changes will be done in the linked list start free the memory occupied by the first node of the list and make the second node of the list as the start node start figure deleting the first node from doubly linked list figure shows the algorithm to delete the first node of doubly linked list in step of the algorithmwe check if the linked list exists or not if start nullthen it signifies that there are no nodes in the list and the step if start null control is transferred to the last statement of the algorithm write underflow go to step howeverif there are nodes in the linked listthen we use [end of ifa temporary pointer variable ptr that is set to point to the first step set ptr start step set start start -next node of the list for thiswe initialize ptr with start that stores step set start -prev null the address of the first node of the list in step start is made step free ptr to point to the next node in sequence and finally the memory step exit occupied by ptr (initially the first node of the listis freed and figure algorithm to delete the first node returned to the free pool deleting the last node from doubly linked list consider the doubly linked list shown in fig suppose we want to delete the last node from the linked listthen the following changes will be done in the linked list start take pointer variable ptr that points to the first node of the list start,ptr move ptr so that it now points to the last node of the list ptr start free the space occupied by the node pointed by ptr and store null in next field of its preceding node start figure deleting the last node from doubly linked list