Linked list:

A linked list is a data structure that is used for dynamic allocation and de allocation of data to/from a list. For example, We can add new students to a list of students or delete some students from the list.

Each node in a linked list consist of two fields: a data field and an address field, e.g. the following represents a node

 

For example a node for Student Jacob Smith would look like:

Some of the linked list operations include :

1. Create a linked list with 3 nodes:

In this case each node has the address of the next node except the last one which is NULL

2. Delete a node from a linked list.

In this case the nodes before the node which is deleted will have the address of the node after that.

3. Add a new node to list.

 

In this case link adjustment need to be made

 

Home Page