Doubly Linked Lists: - Representation - Space Analysis - Creation and Insertion - Traversal - Deletion
Doubly Linked Lists: - Representation - Space Analysis - Creation and Insertion - Traversal - Deletion
• Representation
• Space Analysis
• Traversal
• Deletion
Representation
public class DoublyLinkedList{
protected Element head, tail;
//. . .
public class Element {
Object data; Element next, previous;
list head
tail
Doubly Linked Lists : Space Analysis
tail
• Like singly link list, once Created, elements can be inserted into the
list using either the append or prepend methods
for (int k = 0; k < 10; k++)
list.append(new Int(k));