- Construct a Doubly Linked List
- Compare and contrast Doubly and Singly Linked Lists
- Implement basic operations on a Doubly Linked List
-
Almost identical to Singly Linked Lists, except every node has another pointer, to the previous node!
-
Check out Visualgo.net, click DLL to see the visualization.
- More memory === More Flexibility
- It's almost always a tradeoff!
- Doubly Linked Lists are almost identical to Singly Linked Lists except there is an additional pointer to previous nodes.
- Better than Singly Linked Lists for finding nodes and can be done in half the time!
- However, they do take up more memory considering the extra pointer.
- Doubly linked lists are used to implement other data structures and certain types of caches