Types of Linked List
Linked List
A linked list is a dynamic linear data structure that contains a collection of data elements that are called nodes, where the linearity is maintained by using a pointer.
Operations on Linked List
1. Counting the total number of nodes.
2. Insertion of a new node in the list.
3. Deletion of an existing node from the list.
4. Searching a specified node in the list.
5. Display all nodes of the list.
Types of Linked List
There are two types of linked lists depending on the number of links:
- Singly Linked List
- Doubly Linked List
Singly Linked List
In Singly Linked List, each node has only one address field to contain the address of the next node in the list.
Doubly Linked List
In Doubly Linked List, each node contains two pointer fields, one contains the address of the next node and the other link keeps track of the previous node in the list.