Creating Doubly Linked Lists
00:00 Up until now, we’ve talked about the most basic type of linked list, called the singly linked list. But there are more types of linked lists that can be used for slightly different purposes. If you remember from earlier in the course, we created a method for removing a node from a linked list.
00:19 This worked by finding the node to remove then linking the node before it and after it. The tricky thing about this was that our nodes only stored references to the next node in the sequence, and so we had to use a local variable to store the previously visited node.
00:47 A doubly linked list contains nodes that reference both the next and previous node in the link. That looks something like this: a pointer to the previous node, the data at this node, and a pointer to the next node. Modifying our linked list
Become a Member to join the conversation.