Introduction to Linked List
From this presentation onwards, we are starting with the new chapter called
linked list. In order to maintain a list in a memory, there are basically two ways
available with us. The first one is of course, by using array data structure. The
other one is using linked list data structure and these are basically the data
structures. A single linked list is a list made up of nodes that consists of two
parts. Data part contains the actual data and link part contains address of the
next node of the list. This is not an array; this is a linked list. So, the last element
must be linked to the first element. In order to access the first node of the linked
list, we need a pointer. With the help of link part of the node, we can reach the
next node. I am representing the link between these nodes using these arrows.
As this pointer contains the address 1000, so I am using this arrow. So basically,
this whole list is now accessible. We will see how to create a single linked list
programmatically.
From this presentation onwards, we are starting with the new chapter called
linked list. In order to maintain a list in a memory, there are basically two ways
available with us. The first one is of course, by using array data structure. The
other one is using linked list data structure and these are basically the data
structures. A single linked list is a list made up of nodes that consists of two
parts. Data part contains the actual data and link part contains address of the
next node of the list. This is not an array; this is a linked list. So, the last element
must be linked to the first element. In order to access the first node of the linked
list, we need a pointer. With the help of link part of the node, we can reach the
next node. I am representing the link between these nodes using these arrows.
As this pointer contains the address 1000, so I am using this arrow. So basically,
this whole list is now accessible. We will see how to create a single linked list
programmatically.