DS - Linked List

LINKED LIST

Linked list is most advanced data structure than array.
It is different than array because in array there was sequential memory locations allocated and here in linked list memory locations are not in sequence i.e., in linked list data elements are saved at any locations randomly.
All the elements are linked to each other.
The linking is done with the help of pointer (ptr) .

It is very important to know the start of linked list because it is not like array where we can find linked list location easily.
That’s why in linked list start pointer is used which stores the locations of first element of linked list.
In each node of linked list there are two parts are available.
The first part is known as data which contains elements and in other part the address/location of next element is stored.
That’s why this part is known as next part.
Where the linked list ends at that last node there is null pointer is available.

Comments

Popular posts from this blog

Theory part introduction

Data structure - Sorting methodes