doubly linked lists in singly linked listeach node maintains reference to the node that is immediately after it we have demonstrated the usefulness of such representation when managing sequence of elements howeverthere are limitations that stem from the asymmetry of singly linked list in the opening of section we emphasized that we can efficiently insert node at either end of singly linked listand can delete node at the head of listbut we are unable to efficiently delete node at the tail of the list more generallywe cannot efficiently delete an arbitrary node from an interior position of the list if only given reference to that nodebecause we cannot determine the node that immediately precedes the node to be deleted (yetthat node needs to have its next reference updatedto provide greater symmetrywe define linked list in which each node keeps an explicit reference to the node before it and reference to the node after it such structure is known as doubly linked list these lists allow greater variety of ( )-time update operationsincluding insertions and deletions at arbitrary positions within the list we continue to use the term "nextfor the reference to the node that follows anotherand we introduce the term "prevfor the reference to the node that precedes it header and trailer sentinels in order to avoid some special cases when operating near the boundaries of doubly linked listit helps to add special nodes at both ends of the lista header node at the beginning of the listand trailer node at the end of the list these "dummynodes are known as sentinels (or guards)and they do not store elements of the primary sequence doubly linked list with such sentinels is shown in figure header next next jfk prev next pvd prev next trailer sfo prev prev figure doubly linked list representing the sequence jfkpvdsfo }using sentinels header and trailer to demarcate the ends of the list when using sentinel nodesan empty list is initialized so that the next field of the header points to the trailerand the prev field of the trailer points to the headerthe remaining fields of the sentinels are irrelevant (presumably nonein pythonfor nonempty listthe header' next will refer to node containing the first real element of sequencejust as the trailer' prev references the node containing the last element of sequence