advanced linked lists head tail figure the result of inserting the new node into the doubly linked list figure illustrates the links required to insert node at the front or end of doubly linked list the code for adding node to sorted doubly linked list is provided in listing since tail reference is commonly used with doubly linked listwe can provide more efficient solution by dividing the operation into the four different cases this reduces the need for loop traversal when the list is empty or the new node is prepended or appended to the list head tail newnode (ahead tail (bnewnode figure the links required to insert new node into sorted doubly linked list at the (afront or (bback removing nodes deleting node from doubly linked list is done in similar fashion to that for singly linked list againthere is no need to position pred temporary external reference variable since the predecessor of given node can be accessed using the appropriate prev fields implementation of the delete operation is left as an exercise