Linked list
UNIT 3
Linked list
Linked list
struct node
{
int data;
struct node *next;
};
SINGLY LINKED Lists�
Traversing a Linked List�
Consider the linked list shown in Fig. 6.11. If we have VAL = 4, then the flow of the algorithm can be explained as shown in the figure.
Inserting a New Node in a Linked List�
Deleting a Node from a Linked List�
Deleting the First Node from a Linked List
Deleting the Last Node from a Linked List
CIRCULAR LINKED LISTs
Inserting a New Node in a Circular Linked List
Inserting a Node at the End of a Circular Linked List
DOUBLY LINKED LISTS
Inserting a New Node in a Doubly Linked List