Linked List: Joy Mukherjee Programming & Data Structures
Linked List: Joy Mukherjee Programming & Data Structures
Joy Mukherjee
Programming & Data Structures
Self-Referential Structure
new_node->next = *head;
1 1000
*head = new_node;
*Head = 500
/* The node 'last' used for traversing to the current last node
*/
node *last = *head;
500
1 NULL
500
500
1 NULL
3000
new_node=500
12 2000 2 500
3000 99 4000 8 NULL
12 2000 2 3000
4000 99 4000 8 NULL
12 2000
NULL 2 1000
3000 99 2000
NULL