From charlesreid1

Doubly Linked Lists

Doubly linked lists utilize nodes that store a reference to both their forward and backward neighbor. These types of linked lists are usually implemented using an extra "bumper" node, the header and the trailer, to make bookkeeping easier.

For a Java implementation of a doubly-linked list, see: https://git.charlesreid1.com/cs/java/src/master/lists/linked-lists/DLinkedList.java

This data structure can be useful when implementing a double-ended queue, when traversal in both directions is important. The linked double-ended queue uses a doubly-linked circular list to keep track of data.

Link: https://git.charlesreid1.com/cs/java/src/master/stacks-queues-deques/queues/LinkedDeque.java

Flags