Doubly Linked list is a simple linear data structure formed by collection of data elements called nodes. Each node consists of a data element and 2 link fields. The Left Link gives the address of the previous node and right link gives the address of next node.
This is a Simple implementation of the Doubly Linked List to view more programs of Linked List visit the following Links
Linked-List-C++
Linked-List-Java
Linked-List-Python
Simply Linked List
Each Linked List starts with a head node that points the first node of the List.
Unlike arrays Doubly linked lists are not stored in contagious memory locations rather the are stored at any empty place in memory and the address of the next node is stored in the link field.
Also you don't need to declare the size of the linked list at the time of initialization you can dynamically keep adding elements to the linked list.
Click for complete information on Doubly Linked List
The following implementation of the linked list has the following methods implemented :
- Method to add element at the start of the List
- Method to add element at the end of the List
- Method to display the Linked List.
Python Program
This is a Simple implementation of the Doubly Linked List to view more programs of Linked List visit the following Links
Linked-List-C++
Linked-List-Java
Linked-List-Python
Simply Linked List
Comments
Post a Comment