From charlesreid1

No edit summary
m (Replacing charlesreid1.com:3000 with git.charlesreid1.com)
 
Line 3: Line 3:
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.
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://charlesreid1.com:3000/cs/java/src/master/lists/linked-lists/DLinkedList.java
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.  
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://charlesreid1.com:3000/cs/java/src/master/stacks-queues-deques/queues/LinkedDeque.java
Link: https://git.charlesreid1.com/cs/java/src/master/stacks-queues-deques/queues/LinkedDeque.java


=Flags=
=Flags=

Latest revision as of 03:36, 9 October 2019

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